First date of month

  • Thread starter Thread starter Sunny
  • Start date Start date
S

Sunny

Ho do I find first day of given month or first day of next month?

e.g for 11/14/2003 -> 11/1/2003 (first day of current month) and 12/1/2003
(first day of next month)?

Thanks.
 
Found it!

date - datepart("d",date) + 1
and
dateadd("m",1,date - datepart("d",date) + 1)
 
Try the DateSerial Function.
DateSerial(YEAR(anydate) , Month(anydate), 1)
DateSerial(YEAR(anydate) , Month(anydate)+1, 1)

May
MCP in Access and SQL Server
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top