Creating a timestamp column  Range and storage requirements

Chapter 1: System and User-Defined Datatypes

Date and time datatypes

Use datetime, smalldatetime, date, and time to store absolute date and time information. Use timestamp to store binary-type information.

Adaptive Server has various ways to identify date and time. In versions earlier than 12.5.1, only datetime and smalldatetime were available. As of version 12.5.1, date and time are these separate datatypes:

The default display format for dates is “Apr 15 1987 10:23PM”. You can use the convert function for other styles of date display. You can also perform some arithmetic calculations on date and time values with the built-in date functions, though Adaptive Server may round or truncate millisecond values.

When entering date and time information, always enclose the time or date in single or double quotes.





Copyright © 2005. Sybase Inc. All rights reserved. Range and storage requirements

View this book as PDF