-
Greetings, is there a timezone parameter when using wither to_char or to_date??
I couldn't find one in any documentation.
I want my output to look like this:
Thu March 22 14:56:06 EST 2001
so far I have:
select to_char(sysdate, 'Dy Month DD HH24:MI:SS YYYY') from dual;
thanks,
Magnus
-
You've probably already thought of this, but ...
If you know the timezone the server is in, hardcode it :-)
Or, since sysdate is the server date/time, perhaps you get the entire date/time string at the OS level (assuming your on the server) and pass it into your SQL as a parameter (in Unix, "date +'%a %B %d %H:%M:%S %Z %Y'" would return the string you're after)
Or, if you're doing this interactively, either do a "!date +%Z" or "!env|grep ^TZ" to get just the timezone.
Tim
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|