Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear friends, I need convert date Julian to gregorian and gregorian to Julian.
Help me. Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way:
Const cdCONVERT As Double = 2415018.5 'adjust for time zone Dim dGregorian As Double Dim dJulian As Double dGregorian = Now dJulian = dGregorian + cdCONVERT MsgBox Format(dGregorian, "dd mmm yyyy") & vbNewLine & dJulian Ref: http://aa.usno.navy.mil/data/docs/JulianDate.html In article , Ienidualc wrote: Dear friends, I need convert date Julian to gregorian and gregorian to Julian. Help me. Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A quick Google should give you some ideas:
http://www.freevbcode.com/ShowCode.asp?ID=1670 You can open the *.frm file your favourite text editor. NickHK "Ienidualc" wrote in message ... Dear friends, I need convert date Julian to gregorian and gregorian to Julian. Help me. Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you for your response.
but I need "convert date julian to greagorian and gregorian to Julian" in that exemple (Format): Date Gregorian Date Jualian DD/MM/YYYY YYYYJJJ have a nice day. thanks again "JE McGimpsey" wrote: One way: Const cdCONVERT As Double = 2415018.5 'adjust for time zone Dim dGregorian As Double Dim dJulian As Double dGregorian = Now dJulian = dGregorian + cdCONVERT MsgBox Format(dGregorian, "dd mmm yyyy") & vbNewLine & dJulian Ref: http://aa.usno.navy.mil/data/docs/JulianDate.html In article , Ienidualc wrote: Dear friends, I need convert date Julian to gregorian and gregorian to Julian. Help me. Thanks |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here are two functions tht I use for this purpose. The aDate converts
a Julian date to a regular data. jDate converts regular date to Julian. I am only returning a 5 digit Julian date, but you can adjust that to pull in the entire year if needed. HTH 'Gets Julian date from standard date Function jDate(aDate As Date) NormDateYear = Format(aDate, "yy") NormDateDay = Format(Str(aDate - _ DateValue("1/1/" & Str(NormDateYear)) + 1), "000") jDate = Format(NormDateYear & NormDateDay, "@") End Function 'Gets standard date from Julian date Function aDate(jDate As String) NormDateYear = CInt(Mid(jDate, 1, 2)) If NormDateYear < 30 Then NormDateYear = NormDateYear + 2000 Else NormDateYear = NormDateYear + 1900 End If NormDateDay = CInt(Mid(jDate, 3, 3)) aDate = DateSerial(NormDateYear, _ 1, NormDateDay) End Function Ienidualc wrote: Thank you for your response. but I need "convert date julian to greagorian and gregorian to Julian" in that exemple (Format): Date Gregorian Date Jualian DD/MM/YYYY YYYYJJJ have a nice day. thanks again "JE McGimpsey" wrote: One way: Const cdCONVERT As Double = 2415018.5 'adjust for time zone Dim dGregorian As Double Dim dJulian As Double dGregorian = Now dJulian = dGregorian + cdCONVERT MsgBox Format(dGregorian, "dd mmm yyyy") & vbNewLine & dJulian Ref: http://aa.usno.navy.mil/data/docs/JulianDate.html In article , Ienidualc wrote: Dear friends, I need convert date Julian to gregorian and gregorian to Julian. Help me. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Julian date - find next highest date/number | Excel Worksheet Functions | |||
Change satellite julian date format YYYYDDDHHMMSS to excel date ti | Excel Discussion (Misc queries) | |||
to convert a julian date back to regular date | Excel Worksheet Functions | |||
Convert a julian gregorian date code into a regular date | Excel Worksheet Functions | |||
how to convert julian date to regular calendar date | Excel Worksheet Functions |