Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need function to get programmatically get the first of the year

Status
Not open for further replies.

Fiat77

Programmer
Feb 4, 2005
63
0
0
US
Based on Date() I need to get the first of the year 10 years ago to use as a criteria in my query

So for example for today's Date() I need it to get back 1/1/1995.

I was trying to think of how to use DateAdd or DateDiff with the Date function but wan't sure how

Thanks

 

Hi,

Code:
dateserial(year(MyDate)-10, 1, 1)

Skip,
[sub]
[glasses] [red]Be advised:[/red]We know Newton's 3 Laws. But did you hear about the [red]FOURTH???[/red]
Only ONE fig per cookie![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top