friky.com
← Back to archive

Post

How-to output RFC822 dates in Oracle PL/SQL

2006-11-07 Agustí Pons Original post

There's a little to_char string that can help you in outputting RFC822 dates (the format required for RSS dates) in Oracle PL/SQL.

to_char(sysdate-(1/24),'Dy, DD Mon YYYY hh24:mi:ss','NLS_DATE_LANGUAGE=AMERICAN')||' GMT'

Beware that I've to take one hour off, because I'm in Spain, GMT+1, if you are in a different time zone you only have to add or substract the difference between GMT and your time zone.

I hope you will enjoy.