InfoPath 2010 Formula for Julian Day (###) - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

InfoPath 2010 Formula for Julian Day (###)

Last post 07-16-2015 07:10 PM by donstephen. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 07-07-2015 10:37 AM

    • MeekerGBT
    • Not Ranked
    • Joined on 07-07-2015
    • Oklahoma City
    • Posts 6

    InfoPath 2010 Formula for Julian Day (###)

    So I am searching for an InfoPath 2010 formula for Julian Day. That is to say the resulting value for January 1, 2015 would look something like this "001"

    I am new to InfoPath and would appreciate a formula that is Copy and Paste ready.

    I have created a TXT box named "Julian" in which I plan to paste the formula into.

    Thanks... 

     

    //Signed//

    Greg Tirey
    Oklahoma City
  • 07-12-2015 09:41 PM In reply to

    Re: InfoPath 2010 Formula for Julian Day (###)

    Hi Greg,

    I was attempting to find a Julian Day formula so I could create one for you, but I wanted to verify first if this would be the correct formula:

    A = Y/100
    B = A/4
    C = 2-A+B
    E = 365.25x(Y+4716)
    F = 30.6001x(M+1)
    JD= C+D+E+F-1524.5

    Thanks,

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 07-15-2015 06:13 AM In reply to

    • MeekerGBT
    • Not Ranked
    • Joined on 07-07-2015
    • Oklahoma City
    • Posts 6

    Re: InfoPath 2010 Formula for Julian Day (###)

     Don,

    The Julian day is a three digit number. so Jan 1st. is 001 and December 31st. is 365.

    I use a combination of YEAR/JulianDay/UserID/Seconds in sharePoint to help automate document control numbers.  I want to do the same in InfoPath.

    So looking at your formula, it would appear that the 1524.5 is not the correct result. that might be Julian DATE. IDK...

    Thanks for taking time to help out.

    Greg 

    //Signed//

    Greg Tirey
    Oklahoma City
  • 07-16-2015 12:39 PM In reply to

    • MeekerGBT
    • Not Ranked
    • Joined on 07-07-2015
    • Oklahoma City
    • Posts 6

    Re: InfoPath 2010 Formula for Julian Day (###)

     Formula for Julian Day:

     

    (((substring-before(substring-after(substring-after(now(), "-"), "-"), "T")) + floor((153 * ((substring-before(substring-after(now(), "-"), "-")) + 12 * (floor((14 - substring-before(substring-after(now(), "-"), "-")) / 12)) - 3) + 2) / 5) + (substring-before(now(), "-") + 4800 - (floor((14 - substring-before(substring-after(now(), "-"), "-")) / 12))) * 365 + floor((substring-before(now(), "-") + 4800 - (floor((14 - substring-before(substring-after(now(), "-"), "-")) / 12))) / 4) - floor((substring-before(now(), "-") + 4800 - (floor((14 - substring-before(substring-after(now(), "-"), "-")) / 12))) / 100) + floor((substring-before(now(), "-") + 4800 - (floor((14 - substring-before(substring-after(now(), "-"), "-")) / 12))) / 400) - 32045) - ((substring-before(substring-after(substring-after(concat(string(substring(today(), 1, 4)), "-01-01T00:00:00"), "-"), "-"), "T")) + floor((153 * ((substring-before(substring-after(concat(string(substring(today(), 1, 4)), "-01-01T00:00:00"), "-"), "-")) + 12 * (floor((14 - substring-before(substring-after(concat(string(substring(today(), 1, 4)), "-01-01T00:00:00"), "-"), "-")) / 12)) - 3) + 2) / 5) + (substring-before(concat(string(substring(today(), 1, 4)), "-01-01T00:00:00"), "-") + 4800 - (floor((14 - substring-before(substring-after(concat(string(substring(today(), 1, 4)), "-01-01T00:00:00"), "-"), "-")) / 12))) * 365 + floor((substring-before(concat(string(substring(today(), 1, 4)), "-01-01T00:00:00"), "-") + 4800 - (floor((14 - substring-before(substring-after(concat(string(substring(today(), 1, 4)), "-01-01T00:00:00"), "-"), "-")) / 12))) / 4) - floor((substring-before(concat(string(substring(today(), 1, 4)), "-01-01T00:00:00"), "-") + 4800 - (floor((14 - substring-before(substring-after(concat(string(substring(today(), 1, 4)), "-01-01T00:00:00"), "-"), "-")) / 12))) / 100) + floor((substring-before(concat(string(substring(today(), 1, 4)), "-01-01T00:00:00"), "-") + 4800 - (floor((14 - substring-before(substring-after(concat(string(substring(today(), 1, 4)), "-01-01T00:00:00"), "-"), "-")) / 12))) / 400) - 32045) + 1) 

    //Signed//

    Greg Tirey
    Oklahoma City
  • 07-16-2015 07:10 PM In reply to

    Re: InfoPath 2010 Formula for Julian Day (###)

    Hi Greg,

    The Julian Day formula i found had a longer length, adding all these C+D+E+F-1524.5. Anyway, this is a good formula. Thank you for posting this.

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.