Translate datetime NITES format

Description

This operation parses a datetime string in one format and rewrites it in another format, taking into account both the input and output time zones. This is useful for applications that need to handle and display datetime values in various formats and time zones.

For the complete format reference and additional documentation, see the gotime Nites Format Documentation.

Supported formats

The operation supports a comprehensive set of format tokens for both input and output formats:

Date formats
Format
Output
Description
Example

y

6

1-digit year (last digit)

2026 → 6

yy

06

2-digit year with leading zero

2026 → 26

yyyy

2006

4-digit year

2026 → 2026

m

1

Month without leading zero

January → 1

mm

01

Month with leading zero

January → 01

mt

1st

Month in ordinal format

January → 1st

mmm

Jan

Month short name

January → Jan

mmmm

January

Month full name

January → January

d

2

Day without leading zero

2nd → 2

dd

02

Day with leading zero

2nd → 02

db

2

Day blank-padded

2nd → 2

dt

2nd

Day in ordinal format

2nd → 2nd

ddd

002

Day of year (zero-padded)

Jan 2 → 002

www

Mon

Weekday short name

Monday → Mon

wwww

Monday

Weekday full name

Monday → Monday

Time formats
Format
Output
Description
Example

h

3

Hour 12-format, no leading zero

3 AM → 3

hh

03

Hour 12-format, with leading zero

3 AM → 03

hhhh

15

Hour 24-format with leading zero

3 PM → 15

i

4

Minute without leading zero

04:04 → 4

ii

04

Minute with leading zero

04:04 → 04

s

5

Second without leading zero

05 seconds → 5

ss

05

Second with leading zero

05 seconds → 05

a

pm

AM/PM lowercase

3 PM → pm

aa

PM

AM/PM uppercase

3 PM → PM

.0

.000

Microseconds with leading zeros

-

.9

.999

Microseconds without trailing zeros

-

Timezone formats
Format
Output
Description
Example

z

Z

UTC indicator

UTC → Z

zz

MST

Timezone abbreviation

Mountain → MST

o

±07

Timezone offset (hours only)

UTC+7 → +07

oo

±0700

Timezone offset (no colon)

UTC+7 → +0700

ooo

±07:00

Timezone offset (with colon)

UTC+7 → +07:00

Predefined format constants

The operation also supports several predefined format constants for common use cases:

Predefined formats
Constant
Format
Description

RFC3339

yyyy-mm-ddThhh:ii:ssooo

ISO 8601 format with timezone offset

RFC3339Nano

yyyy-mm-ddThhh:ii:ss.9z

ISO 8601 format with nanoseconds

ANSIC

www mmm db hhh:ii:ss yyyy

ANSI C format

UnixDate

www mmm db hhh:ii:ss zz yyyy

Unix date format

RFC1123

www, dd mmm yyyy hhh:ii:ss zz

RFC 1123 format

RFC1123Z

www, dd mmm yyyy hhh:ii:ss oo

RFC 1123 format with timezone offset

DateOnly

yyyy-mm-dd

Date only format

DateTime

yyyy-mm-dd hhhh:ii:ss

Date and time format

TimeOnly

hhhh:ii:ss

Time only format

Timezone support

The following time zones are supported for both the Input timezone and the Output timezone parameters:

Supported timezones
Timezone
Description

UTC

Coordinated Universal Time

GMT

Greenwich Mean Time

PST

Pacific Standard Time (UTC-8)

PDT

Pacific Daylight Time (UTC-7)

CET

Central European Time (UTC+1)

CEST

Central European Summer Time (UTC+2)

Any IANA Time Zone

e.g. America/Los_Angeles

GMT offsets

e.g. GMT+2, UTC-5


Data types

These are the input/output expected data types for this operation:

Input data

- Strings representing the dates you want to convert.

Output data

- Output formatted date strings.


Parameters

These are the parameters you need to configure to use this operation (mandatory parameters are marked with a *):

Input Format*

Specify the format of your input date strings. Check the allowed formats in the description above.

Input Timezone

Specify the timezone of the input date strings. Check the allowed formats in the description above. If not provided, the default value is UTC.

Output Format*

Specify the desired format of your output date strings. Check the allowed formats in the description above.

Output Timezone

Specify the timezone of the output date strings. Check the allowed formats in the description above. If not provided, the default value is UTC.


Example

Suppose you want to convert a series of dates in the following format:

yyyy-mm-dd hhh:ii:ss

into this one:

dd-mm-yyyy hhh:ii:ss

  1. In your Pipeline, open the required Action configuration and select the input Field.

  2. In the Operation field, choose Translate Datetime NITES Format.

  3. Set Input Format to yyyy-mm-dd hhh:ii:ss

  4. Set Input Timezone to UTC

  5. Set Output Format to dd-mm-yyyy hhh:ii:ss

  6. Set Output Timezone to America/Los_Angeles

  7. Give your Output field a name and click Save. The format of the dates in your input field will be transformed. For example:

2023-06-15 14:30:00 -> 15-06-2023 07:30:00

You can try out operations with specific values using the Input field above the operation. You can enter the value in the example above and check the result in the Output field.

Last updated

Was this helpful?