Problem with date after Desember 31th

TBC

Registered User.
Local time
Yesterday, 20:08
Joined
Dec 6, 2010
Messages
145
I've been have problems with my database date after the new year. Could someone please look at my date fields below and tell me what I'm doing wrong

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")

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

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

Today
DateAdd("d",0,Date())

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

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

Two Months Back
(((DateDiff("m",[DateofPayment],Date()))=1))
 
dates are not working
 
dates are not working

Well this

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

has too many closing parenthesis but the other expressions yield answers, so if you want some help I think you are going to need to be more specific about exactly what's not working the way you want.
 
Monday
DateAdd("d",-WeekDay(Date, vbSunday), Date)+2

Tuesday
DateAdd("d",-WeekDay(Date, vbSunday), Date)+3

Wednesday
DateAdd("d",-WeekDay(Date, vbSunday), Date)+4

Thursday
DateAdd("d",-WeekDay(Date, vbSunday), Date)+5

Friday
DateAdd("d",-WeekDay(Date, vbSunday), Date)+6
 

Users who are viewing this thread

Back
Top Bottom