Click to See Complete Forum and Search --> : C Date Routines


cybercrypt
02-16-2003, 02:46 PM
Can anyone give me an example of taking a string like '12/01/2002' and converting it to a date.

Then get the current date on the system and determine if its greater or less than the above date...

Thanks,

CyberCrypt

threadhead
02-17-2003, 12:26 PM
for that code you wanted, you have to include date.h.
i dont know anything else about that problem, but maybe you should
study the date.h file.

cya

chrism01
02-17-2003, 02:51 PM
#include <time.h>
Relevant lib routines in this include...

bwkaz
02-17-2003, 06:57 PM
Also something like man -k time should print out a TON of functions (stuff in section 3 of the manpages is standard C functions; stuff in section 2 is syscalls) that have "time" in their name or description. You probably want to ignore section 1 (and, indeed, most others).

l01yuk
02-20-2003, 04:27 AM
I think what you're after is asctime() but I'm not entirely sure off hand.

Try man asctime and have a look.