Does anyone have a C routine that allows the user
to pass a date, 'YYYYMMDD' and the # of days
to add to the date and return the new date.
I need it to calculate dates in the future.
Thanks
Kevin
Does anyone have a C routine that allows the user
to pass a date, 'YYYYMMDD' and the # of days
to add to the date and return the new date.
I need it to calculate dates in the future.
Thanks
Kevin
There is no C routine to do this, but you could /easily/ write your own....
I agree with Agrajag. But if you need to get started on this then you should probably start by looking into what functions like time(), gmtime() and other "time" functions do. And also on how to work with the time_t structure. (they should all be in the time.h header file of your compiler. this stuff is pretty standard).
1 rule of the Samurai Code: if you have nothing to say, don't say anything at all!
Ooops, my bad!
The structure name is not "time_t", it's "tm".
1 rule of the Samurai Code: if you have nothing to say, don't say anything at all!