# How ANS date fields are set when publishing documents

Source: https://docs.arcxp.com/en/knowledge-articles/developer/how-ans-date-fields-are-set-when-publishing-documents.html

## Question

What is the correct usage of various date fields used within the Arc XP Native Specification (ANS), and how does Arc XP use these dates?

## Answer

The following table contains the full set of publishing related dates and how they are treated in the Arc XP ecosystem.

- `created_date`, `last_updated_date`, and `first_published_date` are system-generated dates.
- `publish_date` and `display_date` are user overridable.
- Composer offers schedule publishing; Photo Center and Video Center do not.
- When pulling data from the Content API, the date fields are generated in slightly different ways depending on the application that generated the content.

| ANS Field Name       | Composer                                                                                                                   | Photo Center                                                                                                       | Video Center                                                                                                         | API                                                                              |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| display\_date        | “Display Date” Set**by user**in story publish modal.                                                                       | “Display Date” Set**by user**in edit gallery screen.                                                               | “Display Date” Set**by user**in edit video screen.                                                                   | Can be set**by API user**. Will be set to the value of publish\_date if omitted. |
| publish\_date        | “Publish Time” Set automatically**each time**a story is published or a published story is updated.                         | (Not shown) Set automatically**the first time**a gallery is published.                                             | “First Published” Set automatically the**first time**a video is published.                                           | Set automatically by system. Will be**ignored**if sent to API                    |
| first\_publish\_date | “First Publish Date” Set automatically the**first time**a story is published.                                              | (Not used)                                                                                                         | “First Published” Set automatically the**first time**a video is published.                                           | Set automatically by system. Will be**ignored**if sent to API                    |
| last\_updated\_date  | “Last Updated Date” Set automatically on**each save**, and visible only on the unpublished and draft version of the story. | (Not shown) Set automatically on**each save**, and visible only on the unpublished and draft version of the story. | “Last Edited” Set automatically on**each save**, and visible only on the unpublished and draft version of the story. | Set automatically by system. Will be**ignored**if sent to API                    |
| created\_date        | “Created Date” Set automatically on**first save**.                                                                         | (Not shown) Set automatically on**first save.**                                                                    | (Not shown) Set automatically on**first save**.                                                                      | Can be set**by API user**. Will be set to**current date**if omitted.             |
