toggle menu
Icrontic
Categories
Discussions
Best of Icrontic
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Activity
Best of Icrontic
Sign In
·
Register
×
Home
›
Science & Tech
›
Internet & Media
Discussion
Sysdate in c
Title
Author
Category
(All)
Announcements
Gaming
Team Fortress 2
World of Warcraft
Minecraft
Civilization
Backlog of Shame
Science & Tech
Hardware
Internet & Media
Lifestyle
Movies & TV
Music
Style
Food & Drink
Fitness
Home & Auto
Community
Events
Trading Post
Folding@Home
search subcategories
search archived
Tags
What to search
discussions
comments
polls
Date within
1 day
3 days
1 week
2 weeks
1 month
2 months
6 months
1 year
of
Examples: Monday, today, last week, Mar 26, 3/26/04
Search
Sysdate in c
TheDogs
June 2005
edited June 2005
in
Internet & Media
hi guys...im looking for a simple printf statement so that it displays the current system time and date...can anyone help?
0
Comments
cswett
June 2005
edited June 2005
ctime is most likely the easiest.
What type of formating are you looking for?
CSwett
0
cswett
June 2005
edited June 2005
[php]char tstr[128];
time_t t = time(NULL);
snprintf(tstr, 128, "The time and date are: %s.", ctime(&t));[/php]
CSwett
0
TheDogs
June 2005
edited June 2005
Thats perfect m8...thanks...appreciated
0
Sign In
or
Register
to comment.
Comments
What type of formating are you looking for?
CSwett
time_t t = time(NULL);
snprintf(tstr, 128, "The time and date are: %s.", ctime(&t));[/php]
CSwett