O oscarsarrio Member Licensed User Longtime User Jan 28, 2013 #1 Hello would need to convert a string in the format "yyyy-MM-dd hh:mm:ss" to the format "dd/MM/yyyy hh:mm:ss" and I'm thinking to transform date and from there make ... But I have not very clear .... You sure you have it much clearer .... : P ..... :sign0104:
Hello would need to convert a string in the format "yyyy-MM-dd hh:mm:ss" to the format "dd/MM/yyyy hh:mm:ss" and I'm thinking to transform date and from there make ... But I have not very clear .... You sure you have it much clearer .... : P ..... :sign0104:
M MLDev Active Member Licensed User Longtime User Jan 28, 2013 #2 Here's one way to do it: Code: Copy DateTime.DateFormat = "yyyy-MM-dd" Dim t As Long = DateTime.DateTimeParse("2013-01-28", "15:04:00") DateTime.DateFormat = "dd/MM/yyyy" Log(DateTime.Date(t) & " " & DateTime.Time(t)) See SimpleDateFormat for more info on DateFormat. Upvote 0
Here's one way to do it: Code: Copy DateTime.DateFormat = "yyyy-MM-dd" Dim t As Long = DateTime.DateTimeParse("2013-01-28", "15:04:00") DateTime.DateFormat = "dd/MM/yyyy" Log(DateTime.Date(t) & " " & DateTime.Time(t)) See SimpleDateFormat for more info on DateFormat.