This question already has an answer here:

How should I convert date format(dd-mm-yyyy) to timestamp value . Can anyone suggest code how to convert and where to put code .

marked as duplicate by Filip Franik, VE7JRO Oct 9 at 14:34

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    What do you mean by "timestamp value"? And how should we know where to put that resulting code? And what have you tried so far? Where do you use it with Arduino? – chrisl Oct 9 at 13:38

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);

// 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. – Ariser Oct 9 at 14:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.