Guardian Native C Library Calls Reference Manual (G06.25+, H06.03+)
Guardian Native C Library Calls (g - i) getdate(3)
NAME
getdate - Converts user format date and time
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZSTFNSRL
G-series native OSS processes: /G/system/sysnn/zstfnsrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
H-series OSS processes: /G/system/zdllnnn/zcredll
SYNOPSIS
#include <time.h>
struct tm *getdate(const char *string);
extern int getdate_err;
PARAMETERS
string Is a pointer to a string containing date/time information.
DESCRIPTION
The getdate() function parses the date/time information in the input string pointed to by the
string parameter and returns a pointer to a struct tm.
To parse this string, the getdate() function uses templates stored in a text file whose full path-
name is the value for the DATEMSK environment variable. This file is searched one line at a
time until a template is found that matches the input string. The getdate( ) function uses this
template to interpret the input string and convert it to the internal time format.
The following field descriptors can be used in a template:
%A Matches a full weekday name.
%a Matches an abbreviated weekday name.
%B Matches a full month name.
%b Matches an abbreviated month name.
%c Matches an appropriate representation of the date and time for the current locale.
%D Matches a date in the form mm / dd / yy.
%d Matches a two-digit day of the month as a number (01 to 31; the leading 0 (zero)
is optional).
%e Is the same as %d.
%H Matches an hour in the 24-hour clock representation (00 to 23).
%h Matches an abbreviated month name.
%I Matches an hour in the 12-hour clock representation (01 to 12).
%M Matches the minutes (00 to 59).
%m Matches a month number (01 to 12).
%n Matches a newline character.
527192-003 Hewlett-Packard Company 3−13