Create Date Fields

832
1
Jump to solution
04-04-2022 09:39 AM
Ed_
by MVP Regular Contributor
MVP Regular Contributor

Hello,

I am trying to create a month and a day column in ArcPro 2.8. For values I just want to have "01" and "01" for month and day respectively. So, I have 1032 rows, thus "01" and "01" will be filled in 1032 rows under the month and day column.

Now, I have created two columns with the date format, but when I enter "1" as the month value, I get weird date values.

How can I fix this?

 

SaadullahBaloch_0-1649090368761.png

 

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

Date fields are for the entire date, not just the day or the month. You should use a regular text or numeric field for that information. You can use calculate the day or the month from a date field in ArcGIS Pro, such as Arcade's Day or Month function. Note that the Month value is 0-based (0=January, 11=December).

Also, when publishing a date field, you should set the time zone in the layer properties, even if there is no time associated with the date. Unless otherwise specified, the date is assumed to be in UTC and at midnight. If you're in the western hemisphere, this means the date will be set back by how ever many times zones you're in. For example, 4/4/2022 will be published as 4/4/2022 12:00:00 am UTC. In ArcGIS Online, if you're in New York, this will show up as 4/3/2022 7:00:00 pm.

View solution in original post

1 Reply
KenBuja
MVP Esteemed Contributor

Date fields are for the entire date, not just the day or the month. You should use a regular text or numeric field for that information. You can use calculate the day or the month from a date field in ArcGIS Pro, such as Arcade's Day or Month function. Note that the Month value is 0-based (0=January, 11=December).

Also, when publishing a date field, you should set the time zone in the layer properties, even if there is no time associated with the date. Unless otherwise specified, the date is assumed to be in UTC and at midnight. If you're in the western hemisphere, this means the date will be set back by how ever many times zones you're in. For example, 4/4/2022 will be published as 4/4/2022 12:00:00 am UTC. In ArcGIS Online, if you're in New York, this will show up as 4/3/2022 7:00:00 pm.