# Convert Date to Julian Date Format

**URL:** <https://community.glideapps.com/t/convert-date-to-julian-date-format/45423>\
**Category:** Ask for Help\
**Created:** [July 28, 2022, 12:28pm UTC](https://community.glideapps.com/t/convert-date-to-julian-date-format/45423 "2022-07-28T12:28:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kozura](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kozura/32/41946_2.png) [@kozura](https://community.glideapps.com/u/kozura)\
**Post date:** [July 28, 2022, 12:28pm UTC](https://community.glideapps.com/t/convert-date-to-julian-date-format/45423/1 "2022-07-28T12:28:33Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [July 28, 2022, 2:00pm UTC](https://community.glideapps.com/t/convert-date-to-julian-date-format/45423/2 "2022-07-28T14:00:16Z")

</div>

Just to be clear, are you looking for a true [Julian Date](https://en.wikipedia.org/wiki/Julian_day), or just an [Ordinal Date](https://en.wikipedia.org/wiki/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:

```auto
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_

---

<div class="post-metadata">

**Author:** ![kozura](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kozura/32/41946_2.png) [@kozura](https://community.glideapps.com/u/kozura)\
**Post date:** [July 28, 2022, 3:59pm UTC](https://community.glideapps.com/t/convert-date-to-julian-date-format/45423/3 "2022-07-28T15:59:55Z")

</div>

Hi Darren,

Thank you for your help.

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

Much appreciated!

---

<div class="post-metadata">

**Author:** ![kozura](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kozura/32/41946_2.png) [@kozura](https://community.glideapps.com/u/kozura)\
**Post date:** [July 29, 2022, 1:28pm UTC](https://community.glideapps.com/t/convert-date-to-julian-date-format/45423/4 "2022-07-29T13:28:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [July 29, 2022, 1:48pm UTC](https://community.glideapps.com/t/convert-date-to-julian-date-format/45423/5 "2022-07-29T13:48:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [July 30, 2022, 1:48pm UTC](https://community.glideapps.com/t/convert-date-to-julian-date-format/45423/6 "2022-07-30T13:48:32Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
