Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing Date

Status
Not open for further replies.

maccten2000

Programmer
May 13, 2003
37
0
0
EU
Hi

I have a SQL Statement where i want to set the dates to be variable. The format of the dates appears to be timstamp i.e. MM/DD/YYYY HH:MM AM/PM

I am using the code below

Code:
database.col1 > = CAST (CAST (CURRENT_DATE - interval '7' DAY AS DATE FORMAT 'DD/MM/YYYY')||' '|| CAST('09:00' AS TIME) AS TIMESTAMP)

It is telling me that i have parsed the date incorrectly
I was wondering if anyone can help me out with this piece of code

I have also used a variation of the code but this tells me the format is incorrect

Code:
database.col1 > = CAST (CURRENT_DATE - interval '7' DAY AS DATE FORMAT 'DD/MM/YYYY')||' '|| CAST('09:00' AS TIME) AS TIMESTAMP


Thank you for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top