Separation of date

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

Guest

I have a short date 16/06/2004. Is there any function that can separate it to day, month and year?

Thanks
 
DatePart() can return parts of a date.

There are also functions for Day(), Month(), and Year().

If this is just for display purposes, you can put a text box on your
form/report, and set its Format property to:
mmmm
to get the month part, or
dddd
to get the day part, or
yyyy
to show the year part.

Since your date format is different to the US, this article may help to save
you some grief when dealing with dates:
International Date Formats in Access
at:
http://allenbrowne.com/ser-36.html
 
The Day(), Month() and Year() functions. Here's an example using the
Immediate window ...

? Day(Date()), Month(Date()), Year(Date)
16 6 2004

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
Back
Top