Source code

The source code objects are in two implementation languages; RPG and WinC.

RPG400

You want to … Use Parameters
get the current AS/400 system date RPG Get current date Date day
Date month
Date year
get the current AS/400 system time RPG Get current time Numeric time

Windows C++

You want to … Use Parameters
get the current Windows date. WIN Get current date ISO date
get the current Windows time. WIN Get current time ISO time
get the current Windows date, time and micro-seconds. WIN Get current timestamp ISO Timestamp
get the hour from an ISO time. WIN Get hour from time Time hour
ISO time
get the minute from an ISO time. WIN Get minute from time Time minute
ISO time
get the second from an ISO time. WIN Get second from time Time second
ISO time
get the day from an ISO date. WIN Get day from date Date day
ISO date
get the month from an ISO date. WIN Get month from date Date month
ISO date
get the year from an ISO date. WIN Get year from date Date year
ISO date
get a date by combining years, months and days. WIN Construct date from parts ISO date
Date year
Date month
Date day
get a time by combining hours, minutes and seconds. WIN Construct time from parts ISO time
Time hour
Time minute
Time second

Formatting API's

The following WinC source code objects create a text string from a date or time or timestamp and allow you to format it in the way you want it to be viewed. This is useful for outputting dates and times in messages. The Format string field has some pre-defined values for commonly used formats but you can set up and use any format allowed on the C++ sprintf instruction.

You want to … Use Parameters
format an ISO date into a text string. WIN Set date to format Formatted date
ISO date
Format string
format an ISO time into a text string. WIN Set time to format Formatted time
ISO time
Format string
format an ISO timestamp into a text string. WIN Set timestamp to format Formatted timestamp
ISO timestamp
Format string