Data.SqlTimSt.SQLTimeStampToStr

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function SQLTimeStampToStr(const Format: string;
DateTime: TSQLTimeStamp): string;
function SQLTimeStampToStr(const Format: string;
DateTime: TSQLTimeStamp; const FormatSettings: TFormatSettings): string;

C++

extern DELPHI_PACKAGE System::UnicodeString __fastcall SQLTimeStampToStr(const System::UnicodeString Format, const TSQLTimeStamp &DateTime)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
Data.SqlTimSt.pas
Data.SqlTimSt.hpp
Data.SqlTimSt Data.SqlTimSt

Description

Converts a TSQLTimeStamp value to a string.

Use SQLTimeStampToStr to convert a TSQLTimeStamp value to a string.

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.

The FormatSettings parameter can be used to specify the alternate formatting setting to consider during the conversion. This allows the use of locale representations in the resulting string.

See Also