0
How to get current date in c
is there a way to store current system date in a variable in c(any pre defined functions??) if there is ,it would be helpful to know it's syntax too!đ
5 Answers
+ 1
char* chrDate = __DATE__;
printf ("%s",chrDate);
+ 1
you can split value of chrDate variable to access dd mm and yyyy.. I hope you will be able to do it.. let me know if you want me to do the same for you
0
thanks,but I need to access dd mm and yyyy separately to find age...
0
yeah,got it.thanks again!