Is This Content Helpful?
We're glad to know this article was helpful.
Individual portions in a Date field of a feature class or shapefile, such as year, month, day, hour, minute, or second, can extracted using the DatePart() VB function in the Field Calculator.
Note: Note that only the date portion (yyyy/mm/d) is supported in shapefile attributes, therefore, no time information (hh:mm:ss) can be extracted from a shapefile Date field.
DatePart("PART", [DATEFIELD])The PART argument can be one of the following keywords: yyyy (YEAR), m (MONTH), d (DAY), h (HOUR), n (MINUTE), or s (SECOND), and it must be enclosed with double quotation marks.