Fantoma Din Umbra
Fantoma Din Umbra

Reputation: 99

Octave timestamp custom format

I am getting this problem in Octave

datevec("24.02.2016 10:04:36","%d.%m.%Y %H:%M:%S")
DATE not parsed correctly with given format

datevec("24.02.2016 10:04:36","dd.mm.YY HH:MM:SS ")
DATE not parsed correctly with given format

How do I specify correctly my custom format?

Upvotes: 1

Views: 561

Answers (1)

Dan
Dan

Reputation: 45752

You have a 4 digit year (i.e. 2016) but you are using a 2 digit year formatting string i.e. YY).

You should do it like this:

datevec("24.02.2016 10:04:36","dd.mm.yyyy HH:MM:SS")

Please read the docs to see how Octave likes it's date formatting strings.

Upvotes: 3

Related Questions