datetime-format

    3熱度

    2回答

    我正在嘗試將格式爲「2012年8月」的字符串解析爲DateTime對象。該字符串來自DataTable中的列名稱。 string columnName= row[col].ToString(); // "August 2012" 起初我嘗試使用DateTime.TryParse()... bool result = DateTime.TryParse(row[col].ToString, ou

    0熱度

    4回答

    String str = "Jan 15"; DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MMM dd"); LocalDate parsed = LocalDate.parse(str, formatter); 我不斷收到此異常:在線程 異常「主要」 java.time.format.DateTim

    1熱度

    2回答

    Hye guys ..需要您的一些幫助..對不起我的英文破碎。 實際上,即時消息是什麼,我需要從csv文件上傳一些數據到Microsoft Access中,其中包含一個最後的日期..編碼整體沒關係。但我得到日期的問題..當我上傳到數據庫中,我不得不插入按照最後日期csv文件..但我得到的是,在數據庫中,它指的是筆記本電腦上的當前時間。 例如,LASTUPDATE是16/10/2017 ..當我上傳

    -3熱度

    5回答

    我正在使用Java 8,並且在我的.txt文件中有一個字符串,我想將其轉換爲LocalDateTime對象。 String time1 = "2017-10-06T17:48:23.558"; DateTimeFormatter formatter1 = DateTimeFormatter.ofPattern("dd.MM.yyyy. HH:mm:ss"); LocalDateTime al

    0熱度

    1回答

    我想將此數據幀轉換爲R中的單變量時間序列。爲此,我想我想將date_time列變爲索引?讓我知道這聽起來是否正確。下面是實際的數據幀的一小部分: date_time price 2017-05-01 00:00:00 3040 2017-05-01 01:00:00 3030 2017-05-01 02:00:00 3068 2017-05-01 03:00:00 301

    1熱度

    3回答

    我得有月,日的多指標,然後將數據值單列一大熊貓數據幀,看起來是這樣的: Data 1 1 6 2 10 3 11 4 12 5 50 ... 12 1 3 2 4 3 10 4 11 你明白了。我已經把月份和日期分組了。 我想創建一個新的列,一起格式化Month-Date。但似乎無法弄清楚。 所需的

    0熱度

    2回答

    我在hackerrank.com上做了一個簡單的例子,要求我們返回給定日期的那一天。例如:如果日期爲2015年5月8日(月日),則應返回星期三。 這是我寫的這個任務 public static String getDay(String day, String month, String year) { String[] dates=new String[]{"SUNDAY","MONDA

    0熱度

    1回答

    我正在開發一個Android應用程序。 我從JSON文件中得到日期字符串和時間字符串。 fecha_reporte = "2017-12-17" hora_reporte = "23:51:00" 我需要將兩個字符串轉換爲日期變量,然後我需要對它進行一些計算。 這是我到目前爲止有: String fecha = fecha_reporte + " " + hora_reporte; S

    1熱度

    2回答

    嘗試將1天添加到簡單日期格式。發生在線路 import java.text.SimpleDateFormat Date date = new Date(); def dateformat = new SimpleDateFormat("YYYY-MM-dd") def currentDate = dateformat.format(date) log.info "Current Date

    4熱度

    2回答

    我的要求是基於指定的一組有效格式來驗證日期字符串格式是否正確。 有效格式: MM/dd/yy MM/dd/yyyy 我創建使用Java 8 DateTimeFormatterBuilder創建支持多個可選格式柔性格式化一個簡單的測試方法。下面是代碼: public static void test() { DateTimeFormatter formatter = new Date