RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SqlTimSt.SQLTimeStampToStr Function

Converts a TSQLTimeStamp value to a string.

Pascal
function SQLTimeStampToStr(const Format: string; DateTime: TSQLTimeStamp): string;
C++
AnsiString SQLTimeStampToStr(const AnsiString Format, TSQLTimeStamp DateTime);

Use SQLTimeStampToStr to convert a TSQLTimeStamp value to a string an AnsiString.  

DateTimeToStr converts the TSQLTimeStamp value given by DateTime using the format given by Format and returns the resulting string.  

If the string specified by the Format parameter is empty, the TSQLTimeStamp value is formatted using the ShortDateFormat global variable followed by the LongTimeFormat global variable. The time is not displayed if all time fields in the DateTime parameter are 0. 

To create a format string for the Format parameter, use the standard date-time format specifiers: 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!