sql - Oracle date format -
i want convert date 06/23/2008 4:00:00 pm
format
mon june 23 16:00:00 edt 2008
in oracle.please give me sql query fulfill requirement of converting date above mentioned format.
under postgresql follows (and should work fine under oracle):
select to_char(date '06/23/2008', 'dy fmmonth dd 16:00:00 "edt" yyyy');
produces:
mon june 23 16:00:00 edt 2008
the 'fm' before 'month' removes space padding (added make months take same length).
double quoting edt ensures not interpreted part of to_char date formatting.
updated include time:
select to_char(timestamp '06/23/2008 4:00:00 pm', 'dy fmmonth dd hh24:mi:ss "edt" yyyy');
produces:
mon june 23 16:00:00 edt 2008
Comments
Post a Comment