in reply to perl dates into string into SQL
and there's more, but you get the gist.You can use ODBC escape sequences to define a date in a database independent way. For example, to insert a date of Jan 21, 1998 into a table, you could use: INSERT INTO table_name (date_field) VALUES ({d '1998-01-21'}); Similar escape sequences are defined for other date/time types. Here's the full set: {d 'YYYY-MM-DD'} - date {t 'HH:MM:SS'} - time {ts 'YYYY-MM-DD HH:MM:SS'} - timestamp {ts 'YYYY-MM-DD HH:MM:SS.FFFFFF'} - timestamp
at a command prompt to read the documentation that comes with the DBD::ODBC module.perldoc DBD::ODBC
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: perl dates into string into SQL
by bean (Monk) on Sep 17, 2003 at 21:31 UTC |