# Convert Date to Julian Date Format

Hi,

Just wondering if anyone has a simple way to convert a date that a user selects into Julian date format.

I have a need to create a simple Batch Code using Jullian date format and the concatenated with some other values.

I have an Excel and Google Sheet formula that works but when trying to use it in Glide using the “Excel Code” functionality it doesn’t work.

I have also looked at the various date and time functions but can’t find a solution there either. I even tried formatting the date using luxon but I can’t seem to find the functionality there either!

My work around is to use a sheet instead and have the formula in there but I have noticed quite a delay in updating my application with the output. Because of this, I run the risk of a user recording the wrong Batch Code because the app has not updated in time.

Hence I would like to drop the sheet completely and have the functionality all within Glide Tables.

Any help here will be greatly appreciated!

Just to be clear, are you looking for a true Julian Date, or just an Ordinal Date? (yyyyddd). I ask because people often refer to ordinal dates as julian dates.

If an Ordinal date will do, then the following will work in a Math column:

``````YEAR(Date) * 1000
+ FLOOR(275 * MONTH(date)  / 9)
- (FLOOR((MONTH(date) + 9) / 12)
* (1 + FLOOR((YEAR(date) - 4 * FLOOR(YEAR(date) / 4) + 2) / 3)))
+ DAY(date)
- 30
``````

Credit to @jeff_hager for the above

5 Likes

Hi Darren,

The Ordinal Date might work nicely. Let me try that instead!

Much appreciated!

Hi Darren,

Thank you again for your solution, it works well for my purpose. My only ask is if it is possible to drop the first two characters of the output?

The date today outputs a value of 2022210, is it possible to reduce this to 22210 without further manipulation in Glide?

I don’t understand the formula used so not sure how to change it to get the result I need.

Thanks again.

Just subtract 2000000 from that math result. You can add the subtraction to the end of the same formula in the same math column.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
{"ft_lang_label":"__label__en","ft_lang_prob":0.93364865,"math_prob":0.6510981,"size":922,"snap":"2023-40-2023-50","text_gpt3_token_len":190,"char_repetition_ratio":0.11873639,"word_repetition_ratio":0.0,"special_character_ratio":0.20065077,"punctuation_ratio":0.048913043,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.96625626,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-12-10T14:31:42Z\",\"WARC-Record-ID\":\"<urn:uuid:1550ab2f-4904-4fd0-a6bc-7e168d8f15fe>\",\"Content-Length\":\"30758\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:65408ec5-0076-4070-b59a-1e3493554bee>\",\"WARC-Concurrent-To\":\"<urn:uuid:46fc200a-557b-48fe-837e-29eb506a3563>\",\"WARC-IP-Address\":\"184.105.99.75\",\"WARC-Target-URI\":\"https://community.glideapps.com/t/convert-date-to-julian-date-format/45423\",\"WARC-Payload-Digest\":\"sha1:TOEB3NROBQCKUXC5U5DYL72JDGVRDJ6A\",\"WARC-Block-Digest\":\"sha1:RMWOWN65XH6ICWE5QP2SFRESSSOJCPOD\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679102469.83_warc_CC-MAIN-20231210123756-20231210153756-00149.warc.gz\"}"}