Since this seems more of a syntax question, my search didn't produce any useful results.
I'm attempting to make a query that gets European data from an American database using GMT time. I need to get the European time, but can't seem to get it working correctly.
Lets say "myDateField" = '01-01-2010'
SELECT TO_CHAR(myDateField + (60 / 1440), 'Mon" "DD", "YYYY')
Produces exactly what I want, but I need it to stay as a date.
Produces: 'Jan 01, 2010'
SELECT TO_DATE(TO_CHAR(myDateField + (60 / 1440)), 'Mon" "DD", "YYYY')
Merits a "Not a valid Month" error.
Produces: Error
SELECT TO_DATE(TO_CHAR(myDateField + (60 / 1440), 'Mon" "DD", "YYYY'), 'Mon" "DD", "YYYY')
Works, but the formatting is lost.
Produces: '01-01-2010'
How can I format this so that I can get the result the first statement gives, but also keep it as a date? Or is there a better method altogether?
EDIT:
Just as an example of this particular query working under a different circumstance... This is the same query, but instead of converting to European time, it converts to another timezone in North America.
SELECT TO_DATE(TO_CHAR(NEW_TIME(myDateField, 'GMT', 'MDT')), 'Mon" "DD", "YYYY')
Produces exactly what I want, while keeping the data as a date.
Produces: 'Jan 01, 2010'
In summary:
Is there any way to take "myDateField + (60 / 1440)", or use the "FROM_TZ" Keyword, and make the result use the 'Mon" "DD", "YYYY' format, while retaining it's Date type?