Convert 13 digit date to proper date format (DD/MM/YYYY)

293
2
Jump to solution
08-28-2021 11:47 AM
JasonBenedict
New Contributor II

Hello,

I have a numeric field that represents dates in an attribute table that contains 13 digits (e.g 1457222400000). I have seen a few posts like this on converting this to dates if it's in 5 digits but not a number with this many digits.

Is there an easy way I convert this to a proper date format using the field calculator or Arcpy?

Many thanks in advance!

Jason

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Honored Contributor

You'll also want to use the Text function to properly format the date.

Text(Date($feature.dateFieldname), 'D/M/Y')

View solution in original post

2 Replies
DavidPike
MVP Frequent Contributor

If that's a Unix millisecond timestamp I think you can just field calculate with Arcade using

Date($feature.dateFieldname)
KenBuja
MVP Honored Contributor

You'll also want to use the Text function to properly format the date.

Text(Date($feature.dateFieldname), 'D/M/Y')

View solution in original post