1

The last line of my query will not run without "not a valid month" error. I am trying to convert a start time in GMT to local time using an offset in one of the columns, then compare this to a date I have in a variable. It works without using the to_char and offset.

Any insight would be appreciated.

    AND to_char(CT.START_GMT + K.OFFSET/1440,'MM/DD/YYYY HH24:MM:SS') >=     TO_DATE('$From_Date', 'mm/dd/yyyy')
1
  • TO_DATE('$From_Date', 'mm/dd/yyyy') .. you have what is put inside $fromdate ? Commented Mar 8, 2014 at 5:03

1 Answer 1

1
AND CT.START_GMT + K.OFFSET/1440 >=     TO_DATE('$From_Date', 'mm/dd/yyyy')

You don't need a TO_CHAR() conversion.. if CT.START_GMT is a DATE

If CT.START_GMT is not DATE/TIMESTAMP , then you need to do TO_DATE() with the right format.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.