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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get Formatted Date

Status
Not open for further replies.

ekobudy

Programmer
Jul 28, 2002
42
ID
Hi All,
I'm new in C..

how to get formatted Date ?
for example : how to get YYYYMMDDHH24MISS date format ?

regards,

Ekow
 
1) Get the date/time using time. This will return a time_t
2) Convert the time_t to struct tm using either gmtime for UTC/GMT or localtime
3) Format the date/time using strftime
 
Thanks xwb..

ur helping me much :)


regards,

ekow
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top