Hi,
strftime doesn't work for me. I appreciate if you can help me on this.

My hourlyAppAcclTable
 row1 -  1, 1198990800  -- (which is  12-29-2007 21:00:00)
  row 2 -  2, 1198998000  - (which is  12-29-2007 23:00:00)
I want to truncate all the hour fraction and store these time in dayAppAcclTable
      1, 1198915200 ( 12-29-2007 00:00:00)
      2, 1198915200 (12-29-2007 00:00:00)
I still want to store the GMT time in  my dayAppAcclTable as INTEGER too.
Thanks,
Joanne




----- Original Message ----
From: P Kishor <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Sent: Wednesday, December 19, 2007 9:28:22 AM
Subject: Re: [sqlite] How to truncate the hour

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]
-----------------------------------------------------------------------------


      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

Reply via email to