If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
DateDiff function
I am trying to work out the number of days between two dates, EXCLUDING
WEEKENDS to monitor our order order turnaround time. I am using the datediff funtion with "w" as the interval, which the help files describes as weekday intervals. However, it appears to be giving me the intervals in weeks. Have I misinterpretted how the function works or is there a bug? Do you know of an alternative or a workaround to achieve what I am after? Many thanks RL |
#2
|
|||
|
|||
DateDiff function
DateDiff() with "w" will give a difference in week numbers. Not what you
asked for. This might help: Doing WorkDay Math in VBA at: http://www.mvps.org/access/datetime/date0012.htm It does involve some coding (copy'n'paste), and then you can use the functions just like DateDiff() and the built-in ones. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "RL" wrote in message ... I am trying to work out the number of days between two dates, EXCLUDING WEEKENDS to monitor our order order turnaround time. I am using the datediff funtion with "w" as the interval, which the help files describes as weekday intervals. However, it appears to be giving me the intervals in weeks. Have I misinterpretted how the function works or is there a bug? Do you know of an alternative or a workaround to achieve what I am after? Many thanks RL |
#3
|
|||
|
|||
DateDiff function
Use "d" as the interval. D stands for days.
"RL" wrote: I am trying to work out the number of days between two dates, EXCLUDING WEEKENDS to monitor our order order turnaround time. I am using the datediff funtion with "w" as the interval, which the help files describes as weekday intervals. However, it appears to be giving me the intervals in weeks. Have I misinterpretted how the function works or is there a bug? Do you know of an alternative or a workaround to achieve what I am after? Many thanks RL |
#4
|
|||
|
|||
DateDiff function
Perfect. Thank you very much.
"Allen Browne" wrote: DateDiff() with "w" will give a difference in week numbers. Not what you asked for. This might help: Doing WorkDay Math in VBA at: http://www.mvps.org/access/datetime/date0012.htm It does involve some coding (copy'n'paste), and then you can use the functions just like DateDiff() and the built-in ones. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "RL" wrote in message ... I am trying to work out the number of days between two dates, EXCLUDING WEEKENDS to monitor our order order turnaround time. I am using the datediff funtion with "w" as the interval, which the help files describes as weekday intervals. However, it appears to be giving me the intervals in weeks. Have I misinterpretted how the function works or is there a bug? Do you know of an alternative or a workaround to achieve what I am after? Many thanks RL |
Thread Tools | |
Display Modes | |
|
|