Date and Time Formatting in PilotFish Data Mapper
The PilotFish Date and Time Formatter in our Data Mapper is a powerful tool for reformatting date and time strings. By defining the structure of both the input and output dates, PilotFish is able to instantly transform the format without losing any data.
If unfamiliar with date and time patterns, defining one may seem intimidating at first, however, they are really quite simple. A date and time pattern is a series of characters that refer to different components of the date & time. For example, M is for the month, y for the year, h for the hour, etc.
NOTE: It is important to remember that date and time patterns are case-sensitive. For example, M is month, while m is minute.
A common date and time format example is: 2018-01-01 13:01:01.123. That string has all the main components of a date/time format: year, month, day, hour, minute, second, millisecond. As a pattern, it would be: yyyy-MM-dd HH:mm:ss.SSS. It’s important to note the capital H, which is used for hours in the 24-hour format. AM and PM use the lower-case h.
All Pattern Characters
The following is a list of all pattern characters. PilotFish supports all the patterns from Java’s SimpleDateFormat API.
|Letter||Date or Time Component||Presentation||Examples|
|Month in year (context sensitive)||Month|
|Month in year (standalone form)||Month|
|Week in year||Number|
|Week in month||Number|
|Day in year||Number|
|Day in month||Number|
|Day of week in month||Number|
|Day name in week||Text|
|Day number of week (1 = Monday, …, 7 = Sunday)||Number|
|Hour in day (0-23)||Number|
|Hour in day (1-24)||Number|
|Hour in am/pm (0-11)||Number|
|Hour in am/pm (1-12)||Number|
|Minute in hour||Number|
|Second in minute||Number|
|Time zone||General time zone|
|Time zone||RFC 822 time zone|
|Time zone||ISO 8601 time zone|
For more information, please check the Java documentation on date formatting at this link: Simple Date Format