hi erel,
i retrieved a date value from a remote mysql database. the value is shown, let's say "1999-03-26 01:24:16" as an example.
as mysql default format, it simply means 26th march 1999, 01:24:16.
i can use the data as string. but i always get this error "java.text.ParseException: Unparseable date: "1999-03-16 01:24:16" (at offset 4)"
when i use this
Date1=DateTime.DateParse(DateString)
Time1=DateTime.TimeParse(DateString)
Date1 and Time1 are declared as long, while DateString is declared as string.
is there anyway i can get the date value (in tick or long) and the time value (in thick or long) so i can use it for further date calculation?
or should i use this code?
DateTime.DateFormat="yyyy-MM-dd"
DateTime.TimeFormat="HH:mm:ss"
Date1=DateTime.DateParse(DateString)
Time1=DateTime.TimeParse(DateString)
'make a string and other date format
DateTime.DateFormat="dd-MM-yyyy"
DateString=DateTime.Date(Date1) & ", " & DateTime.Time(Time1)
but the code is still throw me the same error, unparseable date