"Joanne Pham" <[EMAIL PROTECTED]>
wrote in message news:[EMAIL PROTECTED]
> I have the following statement:
> select CURRENT_TIMESTAMP;
> the output is :
> 2008-07-22 01:10:34
> and I would like to have the following output:
> TUE JULY 22 01:10:34 2008
> Is there any function that I can format the data to show as above.

select
(case strftime('%w', d) when 0 then 'SUN' when 1 then 'MON ... when 6 
then 'SAT' end)
    || ' ' ||
(case strftime('%m', d) when 1 then 'JAN' ... when 12 then 'DEC' end)
    || ' ' ||
strftime('%d %H:%M:%S %Y', d)
from (select CURRENT_TIMESTAMP as d);

-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925 



_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to