About this article
This article explains what the Now() function is and provide examples of how it can be used with the binding syntax in smart templates.
Prerequisites
|
|
What is the Now() function?
Now() is a function that returns the current date. Now() is very often used in together with FormatDateTime() function.
Now() logic
Syntax | {{Now()}} |
Now() function examples
Example 1
Using Now() together with the FormatDateTime() function to show today's date formatted according to dddd d MMMM yyyy
for the en-US
language.
Binding | {{FormatDateTime(Now(),"dddd d MMMM yyyy","en-US")}} |
Input |
Today's date = 2020-11-12 |
Output | "Thursday 12 November 2020" |
Example 2
Using Now() together with the Translate() function to show today's date formatted according to the DocumentLanguage
set in the user profile.
Binding | {{FormatDateTime(Now(), Translate("FormatLongDate", DocumentLanguage), DocumentLanguage)}} |
Input |
Today's date = 2020-11-12 FormatLongDate = "ddd d MMMM yyyy" DocumentLanguage = "en-US" |
Output | "Thu 12 November 2020" |
Related articles
Comments
0 comments
Article is closed for comments.