PC Review


Reply
Thread Tools Rate Thread

Date Query Manipulation

 
 
Bgreer5050
Guest
Posts: n/a
 
      2nd Sep 2006
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


 
Reply With Quote
 
 
 
 
Smartin
Guest
Posts: n/a
 
      2nd Sep 2006
Bgreer5050 wrote:
> 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
--
Smartin
 
Reply With Quote
 
Bgreer5050
Guest
Posts: n/a
 
      2nd Sep 2006
Thanks.

Worked Great!

"Smartin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Bgreer5050 wrote:
>> 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
> --
> Smartin



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date manipulation =?Utf-8?B?TmV0d29ya1RyYWRl?= Microsoft Access Queries 3 7th Oct 2007 07:39 PM
Date manipulation Ruslan Shlain Microsoft C# .NET 1 23rd Jan 2004 09:32 PM
DATE manipulation Query Seahorse Microsoft Excel Misc 4 17th Nov 2003 10:35 PM
date manipulation query Ryan Microsoft Access Queries 0 24th Sep 2003 05:01 AM
Date manipulation steve Microsoft Access Queries 1 2nd Aug 2003 04:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:25 PM.