I need to implement the functionality of getting the date directly from the machine in my project (library system). I wanted it in the format dia/mês/ano
, to generate the fine for book delivery delay automatically, however, I can only get it this way:
IsitpossibletogetthedatedirectlyfromthemachineintheformatIspokeof?
Followthecode:
#include<stdio.h>#include<time.h>intmain(void){time_tmytime;mytime=time(NULL);printf(ctime(&mytime));return0;}
link