Hi,
Can someone help me.
In MsAccess 2007
I have a column with all the dates in order for 2014
I want a query to tell what is the first date and last date of that 2 week pay period.
The 2 week pay period would start on Dec 28 2013 and be consistent for the whole year.
Like this
Date FirstDateOfPayPeriod LastDateOfPayPeriod
Jan 01 2014 Dec 28 2013 Jan 10 2014
Jan 02 2014 Dec 28 2013 Jan 10 2014
Jan 03 2014 ...so on Dec 28 2013 Jan 10 2014
Jan 09 2014 Dec 28 2013 Jan 10 2014
Jan 10 2014 Dec 28 2013 Jan 10 2014
and so on...
Jan 11 2014 Jan 11 2014 Jan 24 2014
Jan 12 2014 Jan 11 2014 Jan 24 2014
Jan 13 2014 ...so on Jan 11 2014 Jan 24 2014
Jan 24 2014 Jan 11 2014 Jan 24 2014
and so on...
Jan 25 2014 Jan 25 2014 Feb 07 2014
Jan 26 2014 Jan 25 2014 Feb 07 2014
Feb 07 2014 ...so on Jan 25 2014 Feb 07 2014
I found a module to do it for the a 1 week period but can't figure out how too do it for a 2 week period.
The module for the 1 week is working off the ComputorSystemCalander on the week start date (Sat,Sun,Mon etc.).
He is the 1 week module
Public Function FirstDayInWeek(Optional dtmDate As Variant) As Date
If IsMissing(dtmDate) Then
dtmDate = Date
End If
FirstDayInWeek = dtmDate - _
Weekday(dtmDate, vbUseSystemDayOfWeek) + 1
End Function
Public Function LastDayInWeek(Optional dtmDate As Variant) As Date
If IsMissing(dtmDate) Then
dtmDate = Date
End If
LastDayInWeek = dtmDate - _
Weekday(dtmDate, vbUseSystemDayOfWeek) + 7
End Function
There is probably a way to modify these functions to work for the 2 week period but I am not sure how to do this.
Thanks BBryan
Can someone help me.
In MsAccess 2007
I have a column with all the dates in order for 2014
I want a query to tell what is the first date and last date of that 2 week pay period.
The 2 week pay period would start on Dec 28 2013 and be consistent for the whole year.
Like this
Date FirstDateOfPayPeriod LastDateOfPayPeriod
Jan 01 2014 Dec 28 2013 Jan 10 2014
Jan 02 2014 Dec 28 2013 Jan 10 2014
Jan 03 2014 ...so on Dec 28 2013 Jan 10 2014
Jan 09 2014 Dec 28 2013 Jan 10 2014
Jan 10 2014 Dec 28 2013 Jan 10 2014
and so on...
Jan 11 2014 Jan 11 2014 Jan 24 2014
Jan 12 2014 Jan 11 2014 Jan 24 2014
Jan 13 2014 ...so on Jan 11 2014 Jan 24 2014
Jan 24 2014 Jan 11 2014 Jan 24 2014
and so on...
Jan 25 2014 Jan 25 2014 Feb 07 2014
Jan 26 2014 Jan 25 2014 Feb 07 2014
Feb 07 2014 ...so on Jan 25 2014 Feb 07 2014
I found a module to do it for the a 1 week period but can't figure out how too do it for a 2 week period.
The module for the 1 week is working off the ComputorSystemCalander on the week start date (Sat,Sun,Mon etc.).
He is the 1 week module
Public Function FirstDayInWeek(Optional dtmDate As Variant) As Date
If IsMissing(dtmDate) Then
dtmDate = Date
End If
FirstDayInWeek = dtmDate - _
Weekday(dtmDate, vbUseSystemDayOfWeek) + 1
End Function
Public Function LastDayInWeek(Optional dtmDate As Variant) As Date
If IsMissing(dtmDate) Then
dtmDate = Date
End If
LastDayInWeek = dtmDate - _
Weekday(dtmDate, vbUseSystemDayOfWeek) + 7
End Function
There is probably a way to modify these functions to work for the 2 week period but I am not sure how to do this.
Thanks BBryan