why datestr did not give reasonable output?

hi, The range of my data is 2005 to Ontober 2007. when I extracted min and max, I got
709277 and 733325 why when use this function datestr(733325)
I will get : 10-Oct-2007
it is ok . and when use
datestr(709277)
ans =
07-Dec-1941
Thanks in advance

11 commentaires

Walter Roberson
Walter Roberson le 26 Nov 2012
Where did the 709277 come from? What is the earliest date in your data?
huda nawaf
huda nawaf le 30 Nov 2012
Thanks Walter,
this number in my data.
I extracted the min and max of timestamp to see the range of duration time.
Oleg Komarov
Oleg Komarov le 30 Nov 2012
"Your data has not such timestamp" "this number in my data."
According to your contradicting statements your question is nonsense. Please, reformulate your question.
Walter Roberson
Walter Roberson le 30 Nov 2012
Huda, are you saying that 709277 is part of the data that is being extracted from your timestamps, but you do not expect that range of data? What range do you expect? Is it possible that there is something wrong in how you read or store the data so that values you do not expect are showing up in the timestamp column?
Scotty
Scotty le 30 Nov 2012
Modifié(e) : Walter Roberson le 30 Nov 2012
DO you have any idea of what you are really asking! I have already wasted time responding.
Walter Roberson
Walter Roberson le 30 Nov 2012
datestr(709277) really is 07-Dec-1941. What date were you expecting as your earliest date?
huda nawaf
huda nawaf le 30 Nov 2012
it must be in 2005. As mentioned in researchs.
thanks
Walter Roberson
Walter Roberson le 30 Nov 2012
01-Jan-2005 is 732313.
Where did you get the data from? For example, is it from NOAA Hurricane Forecasting data? Can you give us a URL of the original dataset? Can you give us the code you use to load the data?
huda nawaf
huda nawaf le 2 Déc 2012
hi,
*The data that I used is flixster dataset
http://www.cs.sfu.ca/~sja25/personal/datasets/ this dataset is associated with timestamp lately.
I would like to say thing. when you install this dataset , you will find that timestamp in this format ex. 10/10/2007. i.e not integer. But, because this dataset is very huge, I converted the timestamp into integer, then get smaller file in terms of size.
when deal this dataset, I found out the min integer is 709277. befor writing this reply, I came back to original file ,I found out the coresponded date is 07-Dec-1941 as datestr did.
you can be sure if you checked the line with number 7756812. where each line in this dataset has 4 columns.the last column is the date. * thanks
Walter Roberson
Walter Roberson le 2 Déc 2012
I am not clear: are you saying that there is a date of 07-Dec-1941 in the original file? If so then there is no problem, datestr() is just responding correctly for the data.
If there was no 07-Dec-1941 in the original file, then we will need to know how you converted the dates.
huda nawaf
huda nawaf le 2 Déc 2012
Yes the datestr is working correctly. I were thinking there is somthing error, because it is supposed that earliest time in this dataset in 2005. Now, I'm sure there is error in published data.
Thanks

Réponses (1)

Jan
Jan le 26 Nov 2012

0 votes

The answer 07-Dec-1941 is not only reasonable, but also correct. It is 24048 days before the 10-Oct-2007, as the serial date format implies.

Cette question est clôturée.

Tags

Clôturé :

le 20 Août 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by