LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pal Pal is offline
external usenet poster
 
Posts: 27
Default date formating help

I have the function below that returns the YEAR, MONTH, DAY, and HOUR from a
given Julian Day number as input.
But I want to use this as a function that returns MM/DD/YYYY HH:MM in one
cell.

For instance:
tjd= 2451544.5
result = 01/01/2000 12:00
Thanks
Pal


Sub reversejuliandate()
Dim tjd As Double
Dim jyear, jmonth, jday As Long
Dim jhour As Double
Dim coord As Long

tjd = Sheet6.Cells(3, 5)
coord = swe_revjul_d(tjd, 1, jyear, jmonth, jday, jhour)
Sheet6.Cells(20, 2) = jyear
Sheet6.Cells(21, 2) = jmonth
Sheet6.Cells(22, 2) = jday
Sheet6.Cells(23, 2) = jhour
End Sub


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
formating and date changes vince Excel Discussion (Misc queries) 0 May 22nd 08 11:11 PM
Date Formating orquidea Excel Discussion (Misc queries) 2 October 24th 07 03:29 AM
Date Formating Mel Excel Worksheet Functions 5 February 22nd 07 04:13 PM
Date formating chad Excel Worksheet Functions 3 October 21st 06 03:31 PM
Date formating Jake Marx Excel Programming 0 September 10th 03 09:02 PM


All times are GMT +1. The time now is 08:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"