|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Handling dates in Firebird
I have created some tables for my database and have used a date field. Upon trying to perform an insert through the code, I get an error on the insert. I've narrowed it down to the date being the issue. When I checked the db for the format I noticed that FB uses the DDMMYYYY format.
Now I'm using a datetimepicker control in my app and was using the usual syntax of #date# for the insert which is in MMDDYYYY format. So, my question is how do I insert a date into the FB table?? Appreciative. |
|
#2
|
|||
|
|||
|
Quote:
No it doesn't - your client tool might display it that way because it uses your Windows formatting. Firebird itself, for insert/update, uses MM-DD-YYYY and several other formats. This works fine despite any OS date format settings: INSERT INTO mytable VALUES ('20-01-2004')
__________________
Martijn Tonies Database Workbench: developer IDE for Firebird, MySQL, InterBase, MSSQL Server and Oracle Upscene Productions http://www.upscene.com |
|
#3
|
|||
|
|||
|
Thanks I figured out that to insert dates I don't have to input the pound signs with the date value. I noticed Firebird treats the field basically as a text field so I just need apostrophes. Thanks upscene.
|
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > Handling dates in Firebird |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|