Hello,
Please can anyone help me on how to Display Week of the Year Based On Current Date Variable?
Question
Question
Display Week of Year Based On Current Date Variable
Answer
Forms has a Calculation Formula you can use to for this exact request. If you add a single line Field and add the Cacluation Formula below, it will display the Week number for the current date. In this formula NOW() uses the current computer date.
=WEEKNUM(NOW())
If you want to display the week number for a particalar date, replace "NOW()" with the Variable for the particular Date Field
A full reference of Formula available can be found here or by clicking the "learn more" in the Advanced Formula section in the Forms Designer
This just did it perfectly exactly what i was looking for
Thanks
Hello Stewart,
Please how can I do the same to display just the year?
I saw the Year() syntax in the calculator field but didn't know how to specify the year variable. I want just the current year displayed.
Thanks
Same concept here:
=YEAR(NOW())
Replies
Create a date field in your form and input current_date into the Default value. Then create a SQL table that contains typical calendar fields like Week of The Year (Creating a date dimension or calendar table in SQL Server (mssqltips.com)). Use a lookup rule in the form to pull the Week of The Year value based on the value of the current date.