"Joanne Pham" <[email protected]>
wrote in message news:[email protected]
> 20657220 is number of minutes in GMT time zone.
> So we need to convert to second by 20657220 *60.
> select datetime(20657220*60, 'unixepoch','localtime' );
> will be 2009-04-11 00:00:00
In this case, this should work:
strftime('%s', date(startTime*60, 'unixepoch', 'localtime'), 'utc')/60
You convert your UTC timestamp to localtime, strip time portion (by way
of date() function), then convert the result back to UTC (by way of
strfrime(..., 'utc'). This way you'll get a UTC timestamp that
corresponds to midnight local time of the same calendar date.
Igor Tandetnik
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users