|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Dates in Oracle
Advise, please on comparing dates in Oracle SQL. Previously operational code:
(accs.EVENT_DT>'5/18/1992') now throws this error: ERROR: ORA-01843: not a valid month accs.EVENT_DT is a field of type DATE and SQL-Plus displays it like 10-Sep-03 I'm thinking that I need to express the date to which I want to compare accs.EVENT_DT properly. That is to say I need to convert 5/18/1992 (in this example) to a properly formated date expression. Any ideas? |
|
#2
|
||||
|
||||
|
I'm not an oracle expert, but sql server has a function called CAST() which you could use to force your char data to datetime. You might look at your oracle docs to see if there is something similar.
|
|
#3
|
|||
|
|||
|
Could also be that your ORA is configured for a date format other than mm/dd/yyyy
|
|
#4
|
|||
|
|||
|
it's sure that your oracle is set to the format dd/mm/yyyy
Prove to use (accs.EVENT_DT>to_date('05/18/1992','mm/dd/yyyy') |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > Dates in Oracle |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|