Is This Content Helpful?
How can we make this better? Please provide as much detail as possible.
Contact our Support Team
This article describes how to copy date information from multiple number fields to a single date field.
In the following example, the year, month, and day are in separate number fields; the final format will be YYYYMMDD.
Code: Date.make([Year].asstring+":"+[Month].asstring+":"+[Day].asstring,"yyyy:M:dd")Where, Year, Month and Day are the names of the numeric fields that contain the appropriate information.
Note: ArcView uses date format characters to identify date and time components.
M | the month as an integer from 1 to 12 |
MM | same as 'M', two digits with leading zeros |
MMM | the short form of the month name |
MMMM | the long form of the month name |
d | the day of the month as an integer from 1 to 31 |
dd | same as 'd', two digits with leading zeros |
ddd | the short form of the day name |
dddd | the long form of the day name |
y | the year without century |
yy | same as 'y', two digits with leading zeros |
yyy | the year with century, four digits with leading zeros |
yyyy | same as 'yyy' |
yyyyy | the year with century, not restricted to four digits |
c | the century, without a leading zero |
cc | the century, with a leading zero for single digit centuries |
w | week of the year (Week 0 is first week with a Thursday) |
ww | week of the year, two digits with leading zeros |
D | numeric day of the week (Sunday = 1), one digit always |
AD | AD or BC string depending upon the year |
CE | CE or BCE string depending upon the year |
J | Julian Day (days since January 1, 4713 BC) |
j | day of the year |
jj | day of the year, three digits with leading zeros |
Last Published: 7/11/2016
Article ID: 000002464
Software: Legacy Products