From 940b4d1848e8c70ab7642901a68594e8016caffc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 18:51:28 +0200 Subject: Adding upstream version 1:7.0.4. Signed-off-by: Daniel Baumann --- .../source/text/sbasic/shared/03030108.xhp | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 helpcontent2/source/text/sbasic/shared/03030108.xhp (limited to 'helpcontent2/source/text/sbasic/shared/03030108.xhp') diff --git a/helpcontent2/source/text/sbasic/shared/03030108.xhp b/helpcontent2/source/text/sbasic/shared/03030108.xhp new file mode 100644 index 000000000..1662472af --- /dev/null +++ b/helpcontent2/source/text/sbasic/shared/03030108.xhp @@ -0,0 +1,60 @@ + + + + + + + +CDateFromIso Function +/text/sbasic/shared/03030108.xhp + + +Sun Microsystems, Inc. + + + +
+CdateFromIso function + +CDateFromIso Function +Returns the internal date number from a string that contains a date in ISO format (YYYYMMDD or YYYY-MM-DD). +The year part must consist of either two (supported only in YYMMDD format without separators for compatibility) or at least four digits. With four digits leading zeros must be given if the absolute value is less than 1000, it can be negative with a leading minus sign if the date passed denotes a year before the common era (BCE) and it can have more than four digits if the absolute value is greater than 9999. The formatted string can be in the range "-327680101" to "327671231", or "-32768-01-01" to "32767-12-31". +An invalid date results in an error. Year 0 is not accepted, the last day BCE is -0001-12-31 and the next day CE is 0001-01-01. Dates before 1582-10-15 are in the proleptic Gregorian calendar. +When converting a date serial number to a printable string, for example for the Print or MsgBox command, the locale's default calendar is used and at that 1582-10-15 cutover date may switch to the Julian calendar, which can result in a different date being displayed than expected. Use the CDateToIso Function to convert such date number to a string representation in the proleptic Gregorian calendar. +The YYYY-MM-DD format with separators is supported since %PRODUCTNAME 5.3.4. Years less than 100 or greater than 9999 are accepted since %PRODUCTNAME 5.4 if not in VBA compatibility mode. +
+Syntax: + +CDateFromIso(String) + +Return value: +Internal date number +Parameters: + +String: A string that contains a date in ISO format. + + +Example: + + dateval = CDateFromIso("20021231") + dateval = CDateFromIso("2002-12-31") + +return both 12/31/2002 in the date format of your system + +
-- cgit v1.2.3