This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
This functionality has been made obsolete by newer, better solved CDateTime available directly in core instead.
Description
Formats a date according on a given date format mask.
Syntax
s = DT_DateDiff(sDate As String, sFormat As String) As String
Returns
String.
Parameters
Name |
Type |
Optional |
Meaning |
||||||||||||||||||||||||||
sDate |
String |
No |
A valid date. If empty the function will use the current date but always return a native date string (ignore the sFormat parameter) |
||||||||||||||||||||||||||
sFormat |
String |
No |
Specify the format to assign to the date string. Use the following elements to construct a format mask string:
|
Remarks
If you use spaces to separate the elements in the format string, these spaces will appear in the same location in the output string. The letters must be in uppercase or lowercase as shown in the table (for example, "MM" not "mm"). Characters in the format string that are enclosed in single quotation marks will appear in the same location and unchanged in the output string.
Restrictions
See also
Examples
MSGBOX 0, DT_DateFormat("06-15-2005", "yyyy.MM.dd") ' results '2005.06.15'