//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "FormatDateTime.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
// BeginExample: FormatDateTime
// Routine: SysUtils.FormatDateTime
// Routine: DateUtils.IncHour

// BeginCode
/*
The following example uses FormatDateTime to set the string
variable S to a sentence indicating a meeting time in 3
hours. The sentence has the form "The meeting is on
Wednesday, February 15, 1995 at 2:30 PM."
*/
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  AnsiString S = "The meeting is on ";
  S = S + FormatDateTime("dddd, mmmm d, yyyy ' at ' hh:mm AM/PM", IncHour(Now(), 3));
  Label1->Caption = S;
}
// EndCode
// EndExample: FormatDateTime
//---------------------------------------------------------------------------
