Date Query Manipulation

  • Thread starter Thread starter Bgreer5050
  • Start date Start date
B

Bgreer5050

I have a field "date" its format is set at General Date.How can pull the
date apart into seperate fields using a query? I would like a year, month
and day field.

Thanks
 
Bgreer5050 said:
I have a field "date" its format is set at General Date.How can pull the
date apart into seperate fields using a query? I would like a year, month
and day field.

Thanks

try
SELECT YEAR(NOW()), MONTH(NOW()), DAY(NOW())

PS don't use "Date" as a field name as it is a reserved word and can
confuse Access. Use "MyDate" or some such, or bracket the field like
YEAR([Date]).

HTH
 
Thanks.

Worked Great!

Smartin said:
Bgreer5050 said:
I have a field "date" its format is set at General Date.How can pull the
date apart into seperate fields using a query? I would like a year,
month and day field.

Thanks

try
SELECT YEAR(NOW()), MONTH(NOW()), DAY(NOW())

PS don't use "Date" as a field name as it is a reserved word and can
confuse Access. Use "MyDate" or some such, or bracket the field like
YEAR([Date]).

HTH
 

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

Similar Threads


Back
Top