Aug 23, 2002 #1 Guest_imported New member Joined Jan 1, 1970 Messages 0 How can we obtain the current date and add say 7 or 85 days to it? Is there a add function for date????
How can we obtain the current date and add say 7 or 85 days to it? Is there a add function for date????
Aug 23, 2002 1 #2 jamisar Programmer Joined Jul 31, 2002 Messages 523 Location CH sure, #include <time.h> #define HOUR 60*60 #define DAYS HOUR * 24 .... .... log now; time(&now); now += 5 * DAYS + 3 * HOUR; printf("%s\n",ctime(&now)); /* this is ONE possible variant to do that! */ Upvote 0 Downvote
sure, #include <time.h> #define HOUR 60*60 #define DAYS HOUR * 24 .... .... log now; time(&now); now += 5 * DAYS + 3 * HOUR; printf("%s\n",ctime(&now)); /* this is ONE possible variant to do that! */
Aug 23, 2002 Thread starter #3 Guest_imported New member Joined Jan 1, 1970 Messages 0 Great! thanx Upvote 0 Downvote