You are viewing limited content. For full access, please sign in.

Question

Question

Display Week of Year Based On Current Date Variable

asked on September 7, 2024

Hello,
Please can anyone help me on how to Display Week of the Year Based On Current Date Variable?

0 0

Answer

SELECTED ANSWER
replied on September 8, 2024

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

6 0
replied on September 9, 2024

This just did it  perfectly exactly what i was looking for

Thanks

0 0
replied on September 11, 2024

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

0 0
replied on September 11, 2024

Same concept here:

=YEAR(NOW())

1 0

Replies

replied on September 7, 2024

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.  

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.