# Question

### Create a three digit Julian Date

Hello All!

I'm hoping someone can help me out with a calculation in forms.  I am trying to get the three digit julian date number in a field. I've got my calculation here and it references another field that has the current date but I cannot get it to work.  Anybody have any tips?

0 0

# Replies

replied on December 4, 2021

Hi Drew

I'm assuming in your requirement for the Julian day, you want the Year followed by the Day Number

ie: 12/4/2021 = 2021338  or 21338 which is what Google says is the Julian date for that day

When specifying a date for use in a calculations in LF it must be a real date which is why I had to use DATE(YEAR(CurrentDate),1,1) instead of DATE(YEAR(CurrentDate),1,0) and then subtract 1 from it.

Also TEXT in LF is just used to convert a number to a string, so using for example TEXT("33","000") does not format the string which is why I used CONCATENATE ("00") to the front of the Number and then  RIGHT to keep the right three characters which provides for the number always being 3 digits. (ie: 003, 033, 333)

Finally CONCATENATE to add the YEAR of the current date in front of the number.

My Date field variable is CurrentDate where yours is Current_Date_ so you will need to edit that

The results look as such. Hope this helps

=CONCATENATE(YEAR(CurrentDate),RIGHT(CONCATENATE("00",SUB(CurrentDate,SUB(DATE(YEAR(CurrentDate),1,1),1))),3))

0 0
You are not allowed to follow up in this post.