コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

Date2Num Function Replacement in JavaScript for HTML5 form

Avatar

Level 4

Hi All,

I am trying to work on the logic to view difference between two dates in HTML5 form, however i believe the Date2Num function is not working.

 

Can someone please let me know if we can use the Date2Num function is JavaScript or if there is any alternate solution to this.

Also can you please suggest if we can use the Date2Num function for HTML5 form also.

 

Thanks

Pranay

1 受け入れられたソリューション

Avatar

正解者
Employee Advisor

@pranaym48551345 

Date2Num function is not available in Javascript as the JavaScript Date object does not use the epoch as a reference point while Formcalc does. It returns the number of days since the epoch, given a date string, Reference document.

Although, i don't see this function part of the list in FormCalc method supported by HTML5 https://experienceleague.adobe.com/docs/experience-manager-65/forms/html5-forms/scripting-support.ht... 

元の投稿で解決策を見る

1 返信

Avatar

正解者
Employee Advisor

@pranaym48551345 

Date2Num function is not available in Javascript as the JavaScript Date object does not use the epoch as a reference point while Formcalc does. It returns the number of days since the epoch, given a date string, Reference document.

Although, i don't see this function part of the list in FormCalc method supported by HTML5 https://experienceleague.adobe.com/docs/experience-manager-65/forms/html5-forms/scripting-support.ht...