Karls
asked on
using date functions
I need to put system date details in either 1 or 3 variables
ie
date_today = yymmdd
or
date_year = yy
date_month = mm
date_day = dd
thanks
ie
date_today = yymmdd
or
date_year = yy
date_month = mm
date_day = dd
thanks
Use the strftime function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
time_t now = time(NULL);
struct tm *time_data = localtime(&now);
Then you can use the tm_mon (the month starts at 0, so you'll probably add 1), tm_year, and tm_mday struct elements to get the data that you need.