Question : Access Date Function that is the equivalent of to_char(Date,'w') in Oracle

I'm trying to use the DateDiff function in Oracle, but it doesn't work the same as Oracles function.  For instance, I want March 1, 2003 - March 7, 2003 to show up as "1" when getting the 1st week of this month.  Currently March 1, 2003 is "1" and March 2, 2003 is "2".

Can anyone help?

Answer : Access Date Function that is the equivalent of to_char(Date,'w') in Oracle

to_char(Date,'w') calculates the week of the month.

You can use division as 1William suggests, and this is probably a cleaner option. To do this, you will need to make the day negative and use the Int function to round it up, then use the Abs function to make the value positive:

=Abs(Int(-Day(dtIn) / 7))
Random Solutions  
 
programming4us programming4us