On 12/19/07, Joanne Pham <[EMAIL PROTECTED]> wrote:
> Hi All,
> I have the table as defined below:
>      hourlyAppAcclTable ( appid INTEGER,
>                              startTime INTEGER -- is  number of seconds in 
> GMT time in the integer
>             .............
>      )
>
> the values in this table is :
>    row1 -   1, 1198990800
>     row 2 -  2, 1198998000
> If I ran the following sql statement:
>   select datetime(startTime, 'unixepoch','-8 hours');
> I got the output as below:
>    12-29-2007 21:00:00
>    12-29-2007 23:00:00
> I want to store this information in different table, dayAppAcclTable but the 
> startTime is the day. So I want to truncate all the hour.
>    1, 1198915200 ( 12-29-2007 00:00:00)
>    2, 1198915200 (12-29-2007 00:00:00)
> So I want to have generic the formular/function to truncate all hours and 
> only keep the day.


did you check out the formatting functions on the datetime wiki? Check
out strftime

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to