Aller au contenu principal

Timeformat

This reference explains how to format the timeFormat parameter in the logging section of the aqishare, as well as the script parameter for Tasks either invoking RFC or REST.

Reference Time Layout
Mon Jan 2 15:04:05 MST 2006

Formatting the current date with the layout above returns: Wed Oct 30 10:54:50 UTC 2024

Below is a reference of all available layouts to be used:

Required Part of DateUse LayoutLayout results based on current date
Year2006 or
06
Layout 2006 returns 2024
Layout 06 returns 24
MonthJan or
January or
01 or
1
Jan: Oct
January: October
01: 10
1: 10
Day of the weekMon or
Monday
Mon: Wed
Monday: Wednesday
Day of the month2 (without padding) or
_2 (with leading space) or
02 (with leading zero)
2: 30
_2: 30
02: 30
Day of the year__2 (two leading digits) or
002 (with leading zeros)
__2: 304
304
Hour15 (24-h format) or
3 (12-h format without leading zero) or
03 (with leading zero)
15: 10
3: 10
03:
Minute4 (without leading zero) or
04 (with leading zero)
4: 54
04: 54
Second5 (without leading zero) or
05 (with leading zero)
5: 50
05: 50
AM/PM markPMPM: AM

Examples

Format Date to SAP standard format

In SAP ABAP, the type for date fields is DATS, which stores calendar dates in the format YYYYMMDD. To format a date to match this definition, use the following layout.

Timeformat Layout for SAP Dates
20060102

The layout for SAP dates, used with the Format() function, would look like this: Format('20060102', now) and it returns the current date in SAP's DATS format: 20241030