How should I convert date format(dd-mm-yyyy) to timestamp value . Can anyone suggest code how to convert and where to put code .
1 Answer
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
-
Welcome to Arduino.SE. To increase the benefit of all users looking at your post, you should add some explanation to your code. Consider a lot of the users here newbies. At least add some comments in your code.– AriserCommented Oct 9, 2019 at 14:32