469,575 Members | 1,221 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,575 developers. It's quick & easy.

Function to Return 1st of Month

I have a form in Access with 2 date fields for completion. I want to query data from the 1st of the month (e.g. 01 April, 2007) to yesterday. For yesterday I use '=Date()-1', which works great but can't figure out what to use for the other date field.

Will I need to write a function to return this date? Will the function use 'Date' to retrieve the information or will it use the date field box name?

Hope you can help with this, it is driving me crazy!
Apr 19 '07 #1
1 10498
Rabbit
12,516 Expert Mod 8TB
This will return the first day of the current month of the current year.
Expand|Select|Wrap|Line Numbers
  1. CDate(Month(Date()) & "/1/" & Year(Date()))
Apr 19 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by david | last post: by
4 posts views Thread by wongjoekmeu | last post: by
8 posts views Thread by Ravindranath Gummadidala | last post: by
6 posts views Thread by John | last post: by
4 posts views Thread by barcaroller | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.