hmCal_SET FORMAT

hmCal_SET FORMAT(area;type;format)

Parameter          Type             Description
area               Longint      ->  hmCal area
type               Longint      ->  Formattype
format             Text         ->  Format

Contents

Description

The command hmCal_SET FORMAT sets a format for a specific type. Pass a valid value (see below the types-table) in the parameter type. In the parameter Format you must pass a format. You can use placeholders for this purpose (see the placeholder table below).

Contrary to the commands hmCal_SET DATE 4D FORMAT and hmCal_SET TIME 4D FORMAT you can define your own date formats. Is the parameter format an empty string, the standard date format is used or the date format defined by the commands hmCal_SET DATE 4D FORMAT and hmCal_SET TIME 4D FORMAT.

The following formattypes are available:


Format

In the format text you can use the following placeholders:

   Description                                        Example
%a Abbreviated weekday name                           Thu
%A Full weekday name                                  Thursday
%b Abbreviated month name                             Aug
%B Full month name                                    August
%c Abbreviated weekday name, two characters           Th
%d Day of the month                                   23
%H Hours in 24h format (0-23)                         7
%I Hours in 12h format (1-12)                         7
%m Month as a decimal number                          8
%M Minutes as a decimal number (00-59)                36
%n Day of month with leading zero                     01
%N Month as a decimal number with leading zero        08
%p AM or PM designation                               AM
%q Quarter                                            2
%S Seconds as a decimal number (00-59)                48
%W Week number                                        28
%y Year, last two digits (00-99)                      07
%Y Year                                               2007
%% A % sign                                           %

Example

The following example sets the date format to Jan 1, 2007:

hmCal_SET FORMAT(hmCal;1;"%b %d, %Y")