> For the complete documentation index, see llms.txt.
Skip to main content

Check out Port for yourself ➜ 

Datetime

Datetime is a data type used to reference a date and time.

Common datetime usage

The datetime property type can be used to store any date and time, for example:

  • Deployment time
  • Release time
  • Last incident date
  • Creation timestamp

In this live demo example, we can see the Last Update datetime property. 🎬

Display format

By default, Port displays datetime values relative to the current time (e.g., "3 months ago"). Use the optional date_format field to override this - for example, to show exact timestamps for audit logs, or to match your team's locale conventions. The following formats are supported:

  • relative - Relative to the current time, e.g., "3 months ago" (default).
  • 12-hour - 12-hour clock, US convention, e.g., "Nov 26, 2025, 8:50 PM".
  • 24-hour - 24-hour clock, international convention, e.g., "26 Nov 2025 20:50".
  • YYYY-MM-DD HH:mm - Fixed ISO-like format, e.g., "2025-11-26 20:50".

API definition

Use the date_format field to control how the value is displayed in the UI. See display format for supported values.

{
"myDatetimeProp": {
"title": "My datetime",
"icon": "My icon",
"description": "My datetime property",
"type": "string",
"format": "date-time",
"date_format": "12-hour",
"default": "2022-04-18T11:44:15.345Z"
}
}

Check out Port's API reference to learn more.

Terraform definition

Use the date_format field to control how the value is displayed in the UI. See display format for supported values.

resource "port_blueprint" "myBlueprint" {
# ...blueprint properties
properties = {
string_props = {
"myDatetimeProp" = {
title = "My datetime"
icon = "My icon"
description = "My datetime property"
format = "date-time"
date_format = "12-hour"
default = "2022-04-18T11:44:15.345Z"
}
}
}
}

Pulumi definition

Use the date_format field to control how the value is displayed in the UI. See display format for supported values.

"""A Python Pulumi program"""

import pulumi
from port_pulumi import Blueprint,BlueprintPropertiesArgs,BlueprintPropertiesStringPropsArgs

blueprint = Blueprint(
"myBlueprint",
identifier="myBlueprint",
title="My Blueprint",
properties=BlueprintPropertiesArgs(
string_props={
"myDatetimeProp": BlueprintPropertiesStringPropsArgs(
title="My email",
format="date-time",
date_format="12-hour",
Required=True,
)
}
),
relations={},
)