Board index » delphi » Timestamp/Time/Date SQL Formatting

Timestamp/Time/Date SQL Formatting

Would someone care to explain how to insert/update the various time/date
datatypes?  I have tried several methods that I know of and I keep getting
formatting errors.

For example:
insert into foo values( 1, '12-Jan-1900 2:34:00 PM' );

Thanks,
JB

 

Re:Timestamp/Time/Date SQL Formatting


Quote
James Berry wrote:

> Would someone care to explain how to insert/update the various time/date
> datatypes?  I have tried several methods that I know of and I keep getting
> formatting errors.

> For example:
> insert into foo values( 1, '12-Jan-1900 2:34:00 PM' );

        Use 24 hour time:

INSERT INTO FOO (ID, SOME_TIMESTAMP) VALUES (1, '12-Jan-1900 14:34:00');

        HTH,

        -Craig

Other Threads