P
placid
how would i get the current date in the format of DD/MM/YYYY, do i use
functions in time.h and how would i compile it (linking) ?
functions in time.h and how would i compile it (linking) ?
how would i get the current date in the format of DD/MM/YYYY, do i use
functions in time.h
and how would i compile it (linking) ?
-- Ann LandersWalter said:Yes, use time() to fetch the current time, localtime() to break
it down into a struct tm, then extract the structure members of that
that you are interested in and print them yourself.
Caution: the tm_year field is "years since 1900", so be sure to
add 1900 to the value before trying to print it as YYYY !!
No special compilation / linking requirements: use whatever
method is appropriate to your system to compile and link C programs.
Yes, use time() to fetch the current time, localtime() to break
it down into a struct tm, then extract the structure members of that
that you are interested in and print them yourself.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.