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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DatePart or Month

Status
Not open for further replies.

Bennie47250

Programmer
Nov 8, 2001
515
US
I have several queries where I use DatePart function to get the month portion out of a date. Access also has the Month function that does the same thing. Which one is better to use? Why?

Thanks
Bennie
 
Bennie:

The individual functions, Month, Day, Year, etc. are shortcuts for the Datepart function.

Datepart is more robust in that you can extract the week, quarter, etc. for which there are no individual functions.

I would stick with the individual functions when they exist.
Use Datepart for the others.

Vic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top