How should I convert date format(dd-mm-yyyy) to timestamp value . Can anyone suggest code how to convert and where to put code .
Asked
Active
Viewed 516 times
1 Answers
0
It is good for you?
struct tm tm;
time_t fecha;
if ( strptime(timestamp, "%Y-%m-%d %H:%M:%S", &tm) != NULL )
fecha = mktime(&tm);
else
// Another thing
JoseDEV
- 101
- 1