Sample Date Functions (1 Viewer)

Status
Not open for further replies.

Pat Hartman

Super Moderator
Staff member
Local time
Today, 13:31
Joined
Feb 19, 2002
Messages
36,868
This database contains a number of date functions that you can simply copy into your application. There is a tabbed form to show you how to use the calculations. A partial list of functions is:
  1. Business days between two dates.
  2. Business day + days = next business date
  3. Easter (Western)
  4. Age
  5. First Day of Quarter
  6. First Day of Week
  7. First Day of Month
  8. First Day of Previous Month
  9. First Day of Next Month
  10. Last Day of Quarter
  11. Last Day of Week
  12. Last Day of Month
  13. Last Day of Previous Month
  14. Last Day of Next Month
  15. First Weekday (sun, mon, etc) following specified date.
  16. Special DateDiff function that separates the answer into parts
The Business days function includes a holiday table which allows you to specify holidays that do not fall on weekend days.

Updated to include an A2003 version of the app. The original version was created with A2010 and for some reason cannot be opened with A2007 so use the A2003 version if you have A2007.

I added a newer version to the list.
 

Attachments

  • UsefulDateFunctions20201124b.zip
    300.2 KB · Views: 376
  • UsefulDateFunctionsA2003.zip
    183.6 KB · Views: 321
Last edited:

JANR

Registered User.
Local time
Today, 19:31
Joined
Jan 21, 2009
Messages
1,623
Great stuff, one suggestion thou is to modify this:

Code:
Private Sub cmbFunction_AfterUpdate()
Me.txtReqDate = Eval(Me.cmbFunction & "(" & Format(Me.txtBaseDate, "\#mm\/dd\/yyyy\#") & ")")
End Sub

so that it works internationally

JR
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 13:31
Joined
Feb 19, 2002
Messages
36,868
Thanks. I'll take a look at it.
 
Status
Not open for further replies.

Users who are viewing this thread

Top Bottom