+ Reply to Thread
Results 1 to 7 of 7

Need a custom time format to include Julian Day of Year jjj:hh:mm:ss

  1. #1
    Registered User
    Join Date
    02-26-2014
    Location
    Rocket City
    MS-Off Ver
    Excel 2007
    Posts
    3

    Question Need a custom time format to include Julian Day of Year jjj:hh:mm:ss

    I have a very specific need that has recently arisen from a new data collection device. I need to make the following format a 'custom' format that can be easily manipulated across spreadsheets and users.

    Specifically, if given any date/time field, say for example 02/27/2014 08:50:37 (on a 24 hour clock), I need to change the format to:

    jjj:hh:mm:ss, where jjj is the Julian Day of Year (1-365 or 1-366).

    Yes, I have a formula that will work if the date/time is in another cell:

    =TEXT(INT(A1)-DATE(YEAR(A1),1,0),"000")&":"&TEXT(A1,"hh:mm:ss")

    However, I need to be able to easily manipulate this date/time with simple formulas. For example, if I want to add ten seconds to the time, I need to do a simple formula such as =A1+time(0,0,10), where A1 is my jjj:hh:mm:ss formatted time as mentioned above.

    Is this even possible?

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Need a custom time format to include Julian Day of Year jjj:hh:mm:ss

    Perhaps this thread may be of help?

    http://www.excelforum.com/excel-prog...date-time.html

    Alf

  3. #3
    Registered User
    Join Date
    02-26-2014
    Location
    Rocket City
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Need a custom time format to include Julian Day of Year jjj:hh:mm:ss

    Thanks for the reply. I saw that thread, but the problems are different. That user has data/time reported in Julian and wants to change it to something more normal. It also still requires the date and time to be in another field, then uses a formula to manipulate that date and time to be displayed in the requested format.

    I can already do that.

    I need to add a custom data type in the Format Cells dialog do display the data as I mentioned in my original post, so that the date and time can be manipulated easily by Excel novices.

    I don't want to change the format of the date and time, I want it to be recognized by Excel as a valid date/time format.

    I understand that Excel stores all dates/times as integers. So it seems to me that I should be able to display this integer in any reasonable format.

    So whether the date is displayed as:

    2/27/2016 14:44:32
    or
    42427.6142592593
    or
    058:14:44:32

    It is all the same thing.

    If my data is displayed as 058:14:44:32, then I can use simple time and date addition formulas to manipulate it. For the types of records that we have, I need to be able to use the 058:14:44:32 format, that is, if it can be done in Excel.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Need a custom time format to include Julian Day of Year jjj:hh:mm:ss

    I don't think you can do this with a simple custom format - the only format that comes close is dd:hh:mm:ss but that only shows the day of the month, so it would only work in January.

    You could possibly use the formula you already have to add times, e.g. use your current formula but replace A1 with A1+B1, where B1 contains the time value to add
    Audere est facere

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Need a custom time format to include Julian Day of Year jjj:hh:mm:ss

    jjj:hh:mm:ss, where jjj is the Julian Day of Year (1-365 or 1-366).
    Without encoding the year, how would you know how many days there are?
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Registered User
    Join Date
    02-26-2014
    Location
    Rocket City
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Need a custom time format to include Julian Day of Year jjj:hh:mm:ss

    Quote Originally Posted by shg View Post
    Without encoding the year, how would you know how many days there are?
    Because the date and time in Excel are stored as integers.

    As I stated earlier, the following are all the same in Excel, only the formatting is different:

    2/27/2016 14:44:32 --> d/m/yyyy hh:mm:ss
    42427.6142592593 ---> integer value of the date above
    058:14:44:32 ----> Julian representation displaying day of year, also derived from the date above. This is the option I want to be able to use.

    I just want to be able to choose 'format cells' to get the last option without forcing the use of a formula.
    Last edited by The Raddish; 02-27-2014 at 09:51 PM.

  7. #7
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: Need a custom time format to include Julian Day of Year jjj:hh:mm:ss

    Sorry to say so, but don't think it is possible.
    The formatting string in non-standard formatting has limited capabilities.
    Quite extensive set is presented http://office.microsoft.com/en-us/ex...010342372.aspx
    (not mentioned for instance language setting like [$-407]ddd or [$-415]ddd etc.) but anyway - no julianday
    Last edited by Kaper; 02-28-2014 at 02:25 AM.
    Best Regards,

    Kaper

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Custom time format, how to create specific format?
    By JackBauer in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-26-2013, 03:05 AM
  2. Need Custom WeekNum and Year format
    By SJMaye in forum Excel General
    Replies: 5
    Last Post: 03-11-2010, 10:33 AM
  3. Custom time format to save time inputting data
    By daveroe in forum Excel General
    Replies: 3
    Last Post: 11-02-2009, 12:15 PM
  4. converting julian day and year to a date?
    By Chad Nordberg in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-27-2006, 06:30 PM
  5. [SOLVED] Excel should support DAYOFYEAR(year,month,day) returns julian dat.
    By Neil in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-24-2005, 01:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1