Data.SqlTimSt.SQLTimeStampToStr

提供: RAD Studio API Documentation
移動先: 案内検索

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 */;

プロパティ

種類 可視性 ソース ユニット
function public
Data.SqlTimSt.pas
Data.SqlTimSt.hpp
Data.SqlTimSt Data.SqlTimSt

説明

TSQLTimeStamp 値を文字列に変換します。

SQLTimeStampToStr を使用すると、TSQLTimeStamp 値を文字列に変換することができます。

DateTimeToStr は、Format に指定した形式を使って DateTime で指定した TSQLTimeStamp 値を変換し、変換結果の文字列を返します。

Format パラメータで指定した文字列が空であれば、TSQLTimeStamp 値は、ShortDateFormat グローバル変数と LongTimeFormat グローバル変数を使って整形されます。 DateTime パラメータの時間を表すフィールドがすべて 0 であれば、時間は表示されません。

Format パラメータに渡す形式文字列を作成するには、標準の日時形式指定子を使用してください。

FormatSettings パラメータを使うと、変換時に考慮する代替形式設定を指定することができます。 これにより、結果の文字列でロケール表現を使用することができます。

関連項目