iOS Question Parse Date

oscarsarrio

Member
Licensed User
I have this code in B4A to subtract two dates (current and a string receipt of a SQL format yyyy-mm-dd HH: mm: ss) and the result is on minutes.

B4X:
.
.

'String format yyyy-mm-dd HH:mm:ss
yo3=row.Get(8)

.
.
DateTime.DateFormat= "yyyy-MM-dd HH:mm:ss"
Dim t=DateTime.Date(DateTime.Now) '
'Miramos hora actualización
Dim h=(DateTime.DateParse(t)-DateTime.DateParse(yo3))/DateTime.TicksPerMinute 'error in B4i
Error parsing: 2015-01-14 00:00:00.0 <--- Value : yo3 (string)


DateTime.DateParse use is not the same?

Thx
 
Top