November 1, 201015 yr 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
November 1, 201015 yr 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 )
November 1, 201015 yr Author 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
November 2, 201015 yr 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.
Create an account or sign in to comment