Character data can be converted to a noncharacter type—such as a money, date and time, exact numeric, or approximate numeric type—if it consists entirely of characters that are valid for the new type. Leading blanks are ignored. However, if a char expression that consists of a blank or blanks is converted to a datetime expression, Adaptive Server converts the blanks into the Sybase default datetime value of “Jan 1, 1900”.
Adaptive Server generates syntax errors if the data includes unacceptable characters. The following types of characters cause syntax errors:
Commas or decimal points in integer data
Commas in monetary data
Letters in exact or approximate numeric data or bit-stream data
Misspelled month names in date and time data
Implicit conversions between unichar/univarchar and datetime/smalldatetime are supported.
Copyright © 2005. Sybase Inc. All rights reserved. |