Skip to main content
Value Type

DateTimeValue

Wrapper type for date and time values

Wraps primitive:DateTime

DateTimeValue

A wrapper type that encapsulates a DateTime value in API requests and responses.

Overview

DateTimeValue is used throughout the Acumatica API to wrap date and time properties. Dates are serialized in ISO 8601 format.

JSON Structure

{
  "value": "2024-01-15T14:30:00+00:00"
}

Examples

Reading a DateTimeValue

When retrieving an entity, date/time properties are returned as objects:

{
  "Date": {
    "value": "2024-01-15T00:00:00+00:00"
  },
  "LastModified": {
    "value": "2024-01-15T14:32:45+00:00"
  }
}

Setting a DateTimeValue

When creating or updating an entity, provide the value in ISO 8601 format:

{
  "Date": {
    "value": "2024-02-01T00:00:00"
  }
}

Date Only vs DateTime

For date-only fields, time is typically set to midnight:

{
  "DueDate": {
    "value": "2024-03-15T00:00:00"
  }
}

Properties

PropertyTypeDescription
valueDateTimeISO 8601 formatted date/time string
errorstringError message describing validation or processing issues with this field

Error Handling

All value wrapper types inherit an error property that contains a description when there is an issue with the field. Always check this property when processing API responses.

Date Format

The API uses ISO 8601 format: YYYY-MM-DDTHH:mm:ss±HH:mm

  • Date only: 2024-01-15T00:00:00
  • With time: 2024-01-15T14:30:00
  • With timezone: 2024-01-15T14:30:00+10:00

Common Fields Using DateTimeValue

  • Date, DueDate, ShipDate
  • CreatedDateTime, LastModified
  • EffectiveDate, ExpirationDate
  • Any date or timestamp field in the API