I am having string as '033162513' which consist of julian date (first three characters i.e. 033) and time (rest 6 characters i.e. 162513). How can I convert julian date into normal date. Here 033 means 2 Feb. Is there any command in matlab to convert Julian date into Normal date?
|
|
0
|
|
|
|
Reply
|
Rakesh
|
12/7/2010 9:25:07 AM |
|
On 07/12/10 3:25 AM, Rakesh wrote:
> I am having string as '033162513' which consist of julian date (first
> three characters i.e. 033) and time (rest 6 characters i.e. 162513). How
> can I convert julian date into normal date. Here 033 means 2 Feb. Is
> there any command in matlab to convert Julian date into Normal date?
Break this up in to two parts. Separate out the time information and
parse it in to a fraction of a day, either by doing the calculations
yourself or by using date2num. Take the julian date string, convert it
to a number, add the fraction which is the time. To the whole thing, add
the serial date number of the beginning of the year. The result will be
the serial date number of date/time in question, and can be converted
back using datenum.
Alternately, get the date vector form of the beginning of the year.
Break the various time components out of the string and convert them to
number and write them in to the appropriate offset of the date vector.
Take the julian date number part of the string and convert it to number
and write it in as the day number of the month, leaving the month set at
1. This will produce an odd looking date vector such as the "33rd of
January", but when you use datenum to convert the funny date vector back
to a string, it will automatically handle the situation and calculate
the proper month and day of the month, including taking leap years in to
account.
|
|
0
|
|
|
|
Reply
|
Walter
|
12/7/2010 11:18:10 AM
|
|
"Rakesh " <errakeshjain@gmail.com> wrote in message <idkuhj$b5m$1@fred.mathworks.com>...
> I am having string as '033162513' which consist of julian date (first three characters i.e. 033) and time (rest 6 characters i.e. 162513). How can I convert julian date into normal date. Here 033 means 2 Feb. Is there any command in matlab to convert Julian date into Normal date?
(groan) That is *not* a Julian Date, it is a Day-Of-The-Year. About every 6 months or so something pops up either on this newsgroup or on the FEX claiming to work with a Julian Date when in fact it is a Day-Of-The-Year they are working with. The term Julian Date has a very specific definition and should be reserved for that use alone. e.g., quoting from here:
http://en.wikipedia.org/wiki/Julian_date
"The Julian date (JD) is the interval of time in days and fractions of a day since January 1, 4713 BC Greenwich noon."
I realize that there are many, many websites that incorrectly the term Julian Date to apply to Day-Of-The-Year, even some technical websites, but I still feel the need to correct the misuse when I encounter it.
James Tursa
|
|
0
|
|
|
|
Reply
|
James
|
12/7/2010 4:17:05 PM
|
|
Walter Roberson <roberson@hushmail.com> wrote in message <SJoLo.54$AU3.34@newsfe04.iad>...
> On 07/12/10 3:25 AM, Rakesh wrote:
> > I am having string as '033162513' which consist of julian date (first
> > three characters i.e. 033) and time (rest 6 characters i.e. 162513). How
> > can I convert julian date into normal date. Here 033 means 2 Feb. Is
> > there any command in matlab to convert Julian date into Normal date?
>
> Break this up in to two parts. Separate out the time information and
> parse it in to a fraction of a day, either by doing the calculations
> yourself or by using date2num. Take the julian date string, convert it
> to a number, add the fraction which is the time. To the whole thing, add
> the serial date number of the beginning of the year. The result will be
> the serial date number of date/time in question, and can be converted
> back using datenum.
>
>
> Alternately, get the date vector form of the beginning of the year.
> Break the various time components out of the string and convert them to
> number and write them in to the appropriate offset of the date vector.
> Take the julian date number part of the string and convert it to number
> and write it in as the day number of the month, leaving the month set at
> 1. This will produce an odd looking date vector such as the "33rd of
> January", but when you use datenum to convert the funny date vector back
> to a string, it will automatically handle the situation and calculate
> the proper month and day of the month, including taking leap years in to
> account.
Thanks for your reply. I will work on this.
|
|
0
|
|
|
|
Reply
|
Rakesh
|
12/7/2010 5:15:27 PM
|
|
"James Tursa" <aclassyguy_with_a_k_not_a_c@hotmail.com> wrote in message <idlmm1$r0o$1@fred.mathworks.com>...
> "Rakesh " <errakeshjain@gmail.com> wrote in message <idkuhj$b5m$1@fred.mathworks.com>...
> > I am having string as '033162513' which consist of julian date (first three characters i.e. 033) and time (rest 6 characters i.e. 162513). How can I convert julian date into normal date. Here 033 means 2 Feb. Is there any command in matlab to convert Julian date into Normal date?
>
> (groan) That is *not* a Julian Date, it is a Day-Of-The-Year. About every 6 months or so something pops up either on this newsgroup or on the FEX claiming to work with a Julian Date when in fact it is a Day-Of-The-Year they are working with. The term Julian Date has a very specific definition and should be reserved for that use alone. e.g., quoting from here:
>
> http://en.wikipedia.org/wiki/Julian_date
>
> "The Julian date (JD) is the interval of time in days and fractions of a day since January 1, 4713 BC Greenwich noon."
>
> I realize that there are many, many websites that incorrectly the term Julian Date to apply to Day-Of-The-Year, even some technical websites, but I still feel the need to correct the misuse when I encounter it.
>
> James Tursa
Dear James,
Thanks for correcting my mistake.
|
|
0
|
|
|
|
Reply
|
Rakesh
|
12/7/2010 5:18:20 PM
|
|
|
4 Replies
771 Views
(page loaded in 0.055 seconds)
Similiar Articles: Julian Date to Normal Date - comp.soft-sys.matlabI am having string as '033162513' which consist of julian date (first three characters i.e. 033) and time (rest 6 characters i.e. 162513). How can I c... Julian and Century date conversions - comp.lang.rexx... to VM, I've finally stumbled on a case where I need to convert dates to Julian ... Julian Date to Normal Date - comp.soft-sys.matlab How > can I convert julian date ... On converting modified julian date (MJD) to decimal year - comp ...I found the following link to convert from standard dates to MJD, but not the ... Julian Date to Normal Date - comp.soft-sys.matlab... julian date string, convert it to a ... Serial date to clarion date - comp.databases.btrieveJulian Date to Normal Date - comp.soft-sys.matlab Serial date to clarion date ... you create any new tables, use DATE instead of LONG for dates, TIME ... Julian Date to Normal ... Any Function for YYYYMMDD=(Year,Month,Day)? - comp.soft-sys.sas ...Julian Date to Normal Date - comp.soft-sys.matlab Any Function for YYYYMMDD=(Year,Month,Day)? - comp.soft-sys.sas ... Julian Date to Normal Date - comp.soft-sys.matlab Any ... How compare two dates or convert date to number - comp.lang.perl ...Julian Date to Normal Date - comp.soft-sys.matlab How compare two dates or convert date to number - comp.lang.perl ... Julian Date to Normal Date - comp.soft-sys.matlab ... How to get a 180days back date - comp.unix.solarisEspecially if files modified between two arbitrary dates are required. I did ... Julian Date to Normal Date - comp.soft-sys.matlab How to get a 180days back date - comp.unix ... Converting milliseconds to Days, Hours, Minutes, Seconds - comp ...calculate day, hour , sec between dates - comp.lang.java ... Converting ... Julian Date to Normal Date - comp.soft-sys.matlab Converting milliseconds to Days, Hours ... get utc time to date vector - comp.soft-sys.matlabJulian Date to Normal Date - comp.soft-sys.matlab... be the serial date number of date/time in question, and can be converted back using datenum. nth day of the year? - comp.lang.awkJulian Date to Normal Date - comp.soft-sys.matlab > > I realize that there are many, many ... I have a vector of dates "Dates" I want to find the first 3 working days of ... Julian Dates... that the DATE function can handle days beyond the "normal" days in a month. For example, DATE correctly computes 100-Jan-1999 to be 10-April-1999. These Julian dates ... Julian Date to Normal DateI am having string as '033162513' which consist of julian date (first three characters i.e. 033) and time (rest 6 characters i.e. 162513). How can I convert julian ... 7/24/2012 5:25:13 AM
|