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 |
| Represents a full year, such as |
| Represents an abbreviated year, such as | |
Months |
| Represents a fully spelled out month name, such as |
| Represents an abbreviated month name, such as | |
| Represents a two-digit month (with 0-padding), such as | |
| Represents a one-digit or two-digit month (without 0-padding), such as | |
Days |
| Represents a two-digit day of the month (with 0-padding), such as |
| Represents a one-digit or two-digit day of the month (without 0-padding), such as | |
Hours | HH | Represents the hour of the day on a 24-hour clock, such as |
Minutes | mm | Represents the minute of the hour (with 0-padding), such as |
Seconds | ss | Represents the second of the minute (with 0-padding), such as |
Fractions of a Second | SSS | Represents milliseconds, such as |
SSSSSS | Represents microseconds, such as | |
SSSSSSSSS | Represents nanoseconds, such as |