DatePart

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can I use the DatePart function to return two pieces of a date field? For
example, just return the day and month in a report and leave off the year.
By entering =DatePart("d",[Birthdate]) in the text box control source the
day is returned. Similary, if I replace "d" with "m" the month is
returned... but can I get them both at the same time?
Thank you,
Mike Brassel
 
Can I use the DatePart function to return two pieces of a date field? For
example, just return the day and month in a report and leave off the year.
By entering =DatePart("d",[Birthdate]) in the text box control source the
day is returned. Similary, if I replace "d" with "m" the month is
returned... but can I get them both at the same time?
Thank you,
Mike Brassel

Sure, if you do it correctly.
=Format([Birthdate],"m/d")

If you were to use DatePart:
=DatePart("m",[Birthdate]) & "/" & DatePart("d",[Birthdate])
 

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