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 Comments

Where did the 709277 come from? What is the earliest date in your data?
Thanks Walter,
this number in my data.
I extracted the min and max of timestamp to see the range of duration time.
"Your data has not such timestamp" "this number in my data."
According to your contradicting statements your question is nonsense. Please, reformulate your question.
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 on 30 Nov 2012
Edited: Walter Roberson on 30 Nov 2012
DO you have any idea of what you are really asking! I have already wasted time responding.
datestr(709277) really is 07-Dec-1941. What date were you expecting as your earliest date?
it must be in 2005. As mentioned in researchs.
thanks
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?
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
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.
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

Answers (1)

Jan
Jan on 26 Nov 2012
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.

This question is closed.

Tags

Asked:

on 26 Nov 2012

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!