maui Posted November 1, 2010 Posted November 1, 2010 Hello Folks. Need help with this calc.... if (x=y, Show all 'Day 4(Wednesdays)' between current date and 30 days out) Result would be something like if calc ran during first week of November after november 4 11/10/2010 11/17/2010 11/24/2010 Thanks! Maui
Vaughan Posted November 1, 2010 Posted November 1, 2010 Look at the DayOfWeek of the current date. To get to the next Wednesday use: Get( CurrentDate ) + Case ( DayOfWeek( Get( CurrentDate ) ) ≤ 4 ; 4 - DayOfWeek( Get( CurrentDate ) ) ; 11 - DayOfWeek( Get( CurrentDate ) ) ) From here just add 7 onto the date to get the next Wednesday. That calc can be simplified to Mod( 11 - DayOfWeek( Get( CurrentDate ) ) ; 7 )
maui Posted November 1, 2010 Author Posted November 1, 2010 Vaughn: Thank you very much but i don't understand. I have a field called FedexZone, it tells me the'ShipArrivalForecastDate' field which displays the day of week via calc. If we want to change the 'ShipArrivalForecastDate' via a valuelist created from your calc, what would that look like? Thank you again! Maui
Vaughan Posted November 2, 2010 Posted November 2, 2010 If we want to change the 'ShipArrivalForecastDate' via a valuelist created from your calc, what would that look like? I can only answer the questions you ask. You want a value list to display the next 4 weeks of Wednesdays. Initially you just asked for a calculation that would work the dates out. The "display them in a value list" changes the game significantly. To be honest I have no idea how to make a value list display just the next 4 dates. At least not simply.
Recommended Posts
This topic is 5193 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now