Solved

Access 2003 Query using DatePart Function

Posted on 2008-10-15
2
451 Views
Last Modified: 2010-04-21
In a MS Access 2003 query, I am trying to extract a two-digit month from a birth date field.  

1)  When I use DatePart('m', [birth_date]) it displays the month 1- 12.  Months 1-9 are only one digit.

2)  When I use DatePart('mm', [birth_date]) it displays the error message "Invalid Procedure Call".

How do I extract a two-digit month from a birth date field in a MS Access 2003 query?
0
Comment
Question by:nulad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 22725158
this will do:
right( '0' & DatePart('m', [birth_date]) , 2)

Open in new window

0
 

Author Closing Comment

by:nulad
ID: 31506484
Thank you!  Worked beautifully.  You are a Genius!
0

Featured Post

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As they say in love and is true in SQL: you can sum some Data some of the time, but you can't always aggregate all Data all the time! Introduction: By the end of this Article it is my intention to bring the meaning and value of the above quote to…
Introduction Hopefully the following mnemonic and, ultimately, the acronym it represents is common place to all those reading: Please Excuse My Dear Aunt Sally (PEMDAS). Briefly, though, PEMDAS is used to signify the order of operations (http://en.…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question