NewDateFormatter Use
Posted: Thu Jul 30, 2020 10:31 am
Hi,
I want to get the serial date of the following date:
31/07/2020.
Normally I would subst this and use DayNo.
But I thought I would try the following:
I get the following results when I output to excel:
vDateCompareSerial = 21945.004861111
vDateCompare = 31/07/2020
But vDateCompareSerial equates to 31/01/2020 and not 31/07/2020.
What is going on?
Maren
I want to get the serial date of the following date:
31/07/2020.
Normally I would subst this and use DayNo.
But I thought I would try the following:
Code: Select all
cDate = '31/07/2020';
vDateFormater = NewDateFormatter('');
vDateCompareSerial = ParseDate(vDate, 'dd/mm/yyyy');
vDateCompare = FormatDate( vDateCompareSerial, 'yyyy-mm-dd' );
vDateCompareSerial = 21945.004861111
vDateCompare = 31/07/2020
But vDateCompareSerial equates to 31/01/2020 and not 31/07/2020.
What is going on?
Maren