Expand my Community achievements bar.

Adding Days of the Week

Avatar

Former Community Member

Good Morning All,

I am creating a timesheet. In this timesheet, I have a date field named "PPSD1". I have made a table for the days in this pay period. In this table, there are fields for the days of the week. I have inserted the below code, which takes the date I enter into "PPSD1" and calculates the day of the week, inserting it into a field named "Day1".

Num2Date(Date2Num(PPSD1.formattedValue

, "MM/DD/YYYY"), "EEEE")

What I need to do, is have it calculate the remaining days of the week automatically based on this first entry.

For example, if I enter 06/01/2010 into "PPSD1", then it returns "Tuesday" into "Day1". I need it to put "Wednesday" into "Day2"; "Thursday" into "Day3", etc.

Any and all help is GREATLY appreciated.

Gene-O

3 Replies

Avatar

Level 10

Hi,

Here is a sample which uses the Pattern date{EEEE} to show the day of the week. https://acrobat.com/#d=9y7jKTRm3UWMtnPoIfUdsg

FormCalc is best for working with dates, so you will see the Num2Date and Date2Num functions used in the calculate event.

Hope that helps,

Niall

Avatar

Former Community Member

I have done something similar where I put the Dates into the days for a pay period. It is not quite what you are looking for but shoudl give you ideas of how to solve it. Please see the attached form.

Paul

Avatar

Former Community Member

Thank's very much!!!

You guys are awesome!

Gene-O