February 12, 200421 yr Hello I have a situation where there is a date scheme my predecessor used. For example if it was the date of 12/9/2003 he had assigned a "DATE NUMBER " of 0347 meaning the year is 03 and the week of that year is 47 . I can figure this out but there is a problem I am having ... If the week is in the first part of the year ( the single digit weeks) how can I get the zero placed in a calculation? for example the date is 1/4/2004 I would need the date to calculate to 0401 meaning the 1st week of 2004 but instead I get 041 I could use some help here Thanks Stan
February 12, 200421 yr Hi Stan You could check to see if the week number was less than 10, if it is add on the 0, just incorporate this into your exisiting calc: Case(WeekofYear(date) < 10 ,0 & WeekofYear(date),WeekofYear(date)) HTH Ed
February 12, 200421 yr You can also tweak the Case function to remove redundancy. Case(WeekofYear(date) < 10 ,"0") & WeekofYear(date)
Create an account or sign in to comment