Entering date in a table and transforming the date to text puts the date to a day before

174
5
Jump to solution
08-30-2022 03:53 PM
Labels (3)
KristinVernon1
New Contributor III

I need some help with dates in ArcGIS Pro. I have an enterprise geodatabase table that a user would enter dates through different products. I am entering the dates directly through ArcGIS Pro.

I created a "DateOnly" column that would basically extract ONLY the date part of the Datetime field so that I may use it for reporting purposes. However as you can see in the screenshot, when transforming the date, it sets the date a day earlier. It seems that when I set the time to earlier than 6 is when I have this issue.

Please, how can I fix this?

KristinVernon1_0-1661964198580.png

 

 

0 Kudos
1 Solution

Accepted Solutions
KristinVernon1
New Contributor III

So what I ended up having to do after much trial and error was change the dates to UTC then format it using the Date formula so it becomes how I want it to. 

View solution in original post

0 Kudos
5 Replies
KenBuja
MVP Esteemed Contributor

Unless you tell it otherwise, it assumes that the date and times are in UTC instead of your local time zone. If you set the time zone in your layer in ArcGIS Pro, does it still exhibit this problem?

0 Kudos
KristinVernon1
New Contributor III

I tried using the "ToLocal()" arcade expression but no dice. This is a geodatabase table that I'm entering the data into

0 Kudos
KristinVernon1
New Contributor III

I have below a screenshot of my contents pane. I enabled the Time field and put the correct time zone in the layer named "Water Device", however it is in the Standalone Tables that I am having the time issue. Nevertheless I set the time zone in the Water Device layer and the problem still persists in the Standalone Tables.

KristinVernon1_0-1661965171878.png

 

0 Kudos
KristinVernon1
New Contributor III

I noticed that when I copy the date time without the time into the new field it sets the time to 6, I wonder if this has anything to do with the fact that my timezone is -6, please any help on this?

0 Kudos
KristinVernon1
New Contributor III

So what I ended up having to do after much trial and error was change the dates to UTC then format it using the Date formula so it becomes how I want it to. 

0 Kudos