Skip to main content

User Guide

Date and Timestamp formats

When processing data containing a date or timestamp field, Privitar uses format conventions based on the formats defined in the Java.time.format class. For example, this convention is used when importing CSV files or outputting data to CSV files.

The Privitar Schema Date format for a Timestamp field of format:

24-12-2019 12:11:02.123

is:

dd-MM-yyyy HH:mm:ss.SSS

Note the following upper-case and lower-case distinctions in the formats:

  • lower-case m is minutes, not months.

  • upper-case M is month, not minutes.

  • lower-case s is seconds, not fractions of seconds.

  • upper-case S is fractions of seconds, not seconds.

Some more common example formats are shown in the table below:

Date / Time

Format

Description

Years

yyyy

Represents a full year, such as 1999.

yy

Represents an abbreviated year, such as 99.

Months

MMMM

Represents a fully spelled out month name, such as January.

MMM

Represents an abbreviated month name, such as Jan.

MM

Represents a two-digit month (with 0-padding), such as 03 or 11.

M

Represents a one-digit or two-digit month (without 0-padding), such as 3 or 11.

Days

dd

Represents a two-digit day of the month (with 0-padding), such as 06 or 24.

d

Represents a one-digit or two-digit day of the month (without 0-padding), such as 6 or 24.

Hours

HH

Represents the hour of the day on a 24-hour clock, such as 04 or 10.

Minutes

mm

Represents the minute of the hour (with 0-padding), such as 05 or 34.

Seconds

ss

Represents the second of the minute (with 0-padding), such as 07 or 18.

Fractions of a Second

SSS

Represents milliseconds, such as 003 or 121.

SSSSSS

Represents microseconds, such as 000003 or 432121.

SSSSSSSSS

Represents nanoseconds, such as 000000003 or 139648121.