|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Simple SQL Plus Question
I'm trying to Insert the following into a field that has a datatype of Date and it is giving me a 'Not a valid month' error message:
'08/08/2003 10:07:58 AM' I took out the single quotes and it didn't like the 07 in the time, got an error message saying, 'Bind variable "07" not declared.' I definitely need a date/timestamp for this field and it is formatted this way because of coding standards I must adhere to. Why is it saying 'Not a valid month'????? Help! |
|
#2
|
||||
|
||||
|
Re: Simple SQL Plus Question
Quote:
Have you checked the documentation with your database to see what format it requires the dates to be formatted in. You'll have to change your standard date formatting for database interaction if they're not compatible.
__________________
~ishnid; Have you tried: [ search.cpan.org | perldoc | Java API | mysql.com | google ] Apostrophes are NOT used for possessive pronouns or for noun plurals, including acronyms. |
|
#3
|
|||
|
|||
|
2 options
1. put a to_date('08/08/2003','mm/dd/yyyy') around it... you'll have to look up the correct mask for the time. 2. if you actually want a timestamp just use sysdate() in your insert/update query. |
|
#4
|
|||
|
|||
|
try
INSERT INTO asd (date) VALUE ('01-APR-02'); |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > Simple SQL Plus Question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|