Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 20th, 2003, 07:34 AM
srb9856 srb9856 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 1 srb9856 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Breaking Date Fields Apart

I have a date field in an access table which I need to split into 2 fields one for month and one for year to allow me to group by the month and year.

I have checked in mysql book and a couple of features such as DATENAME and EXTRACT(MONTH from FIELD) are suggested however these are not recognised in MSACCESS.

I would be grateful for some suggestions on other options.

Thanks

Stephen.

Reply With Quote
  #2  
Old October 21st, 2003, 06:58 AM
ansentry's Avatar
ansentry ansentry is offline
Access amateur
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Melbourne, Australia
Posts: 494 ansentry User rank is Corporal (100 - 500 Reputation Level)ansentry User rank is Corporal (100 - 500 Reputation Level)ansentry User rank is Corporal (100 - 500 Reputation Level)ansentry User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 5 Days 19 h 49 m 55 sec
Reputation Power: 7
Try using help and enter "date format" you will find the answer there in the example.

I have also attached a sample db you may find helpful.


Regards,
__________________
Regards,


John A


Reply With Quote
  #3  
Old October 23rd, 2003, 10:16 PM
michael michael is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Sydney, Australia
Posts: 12 michael User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 4 m 33 sec
Reputation Power: 0
You could try using the SQL string functions LEFT$(filedname,len_from_start), MID$(fieldname, startpos, len) and RIGHT$(fieldname,len_from_end)

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > Breaking Date Fields Apart


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway