Created
November 20, 2012 16:33
-
-
Save phatblat/4119062 to your computer and use it in GitHub Desktop.
Sqlite command to generate Date in RFC 1123 format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
case cast (strftime('%w', datetime()) as integer) | |
when 0 then 'Sun' | |
when 1 then 'Mon' | |
when 2 then 'Tue' | |
when 3 then 'Wed' | |
when 4 then 'Thu' | |
when 5 then 'Fri' | |
else 'Sat' end || | |
strftime(', %d ', datetime()) || | |
case cast (strftime('%m', datetime()) as integer) | |
when 1 then 'Jan' | |
when 2 then 'Feb' | |
when 3 then 'Mar' | |
when 4 then 'Apr' | |
when 5 then 'May' | |
when 6 then 'Jun' | |
when 7 then 'Jul' | |
when 8 then 'Aug' | |
when 9 then 'Sep' | |
when 10 then 'Oct' | |
when 11 then 'Nov' | |
else 'Dec' end || | |
strftime(' %Y %H:%M:%S GMT', datetime()) as formattedDate | |
from sqlite_master | |
limit 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment