# Thread: Date Functions

1. Registered User
Join Date
Nov 2006
Posts
43

## Unanswered: Date Functions

I've been having problems with my dates

Day functions are not working. "Pulling the correct information"

Monday
Date()-((((Weekday(Date()+2))+3)))

Tuesday
Date()-((Weekday(Date(),2))+5)

Wednesday
Date()-(Weekday(Date(),2)+4)

Thursday
Date()-(Weekday(Date()+2)+0)))

Friday
Date()-(Weekday(Date()+2)+6)

Month to Date
Format(Date(),"yyyymm")

----------------------------------------------------

Other examples

PreMonth
(((DateDiff("m",[DateofPayment],Date()))=1))

PreYear
Expr1: DateDiff("yyyy",[DateofPayment],Date())

Today

Year to Date
Format(Date(),"yyyy")

ONe Month Back
(((DateDiff("m",[DateofPayment],Date()))=0))

Two Months Back
(((DateDiff("m",[DateofPayment],Date()))=1))

2. Registered User
Join Date
Apr 2014
Location
Kentucky
Posts
630
Date math is done with

3. Moderator
Join Date
Jun 2005
Location
Richmond, Virginia USA
Posts
2,764
Probably would help if you gave a clearer explanation of what your goals are...i.e. what Monday? The Monday of the current week? The Monday of last week? Monady of next week?

Like that, for each day of the week.

Same thing for PreMonth, PreYear, Today...etc.

Linq ;0)>

4. Registered User
Join Date
Nov 2008
Posts
24

## Date functions

I have attached a draft module of a number of date related functions I've collected over time.
It has many functions you might find useful.
This is not all of my own work and is available via many forums and authors.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•