Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TDateTime

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I use the following code to display the time in hh:mm:ss and would like to display it in 24hour format. Can I modify this code to do that???

TDateTime Time1(TDateTime::CurrentTime());
TDateTime theTime = Time1;
Label1->Caption=theTime;
 
Look at the FormatDateTime function in your help files. It should work something like:
Code:
  TDateTime Time1(TDateTime::CurrentTime());
  TDateTime theTime = Time1;
  Label1->Caption=FormatDateTime("hh:nn:ss", theTime); // I think
James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top