How to convert Date to decimal codeunit

I want this date to give me any date instead of today, how to change this date: It's my date
DateTimeToDecimal(TODAY,TIME,'UTC');


LOCAL DateTimeToDecimal(date : Date;time : Time;timeZoneCode : Code[10]) decimalDate : Decimal
IF (date = 0D) THEN
EXIT(0);

IF time = 0T THEN
EXIT((date-01010000D) * 86.4 - L_TZDiff*3.6)
ELSE
EXIT(((date-01010000D) * 86.4) + (time - 000000T)/1000000 - L_TZDiff*3.6);
Sign In or Register to comment.