Welcome Guest ( Log In | Join )

Discover the best free computer help!
Learn more about Geeks to Go by taking the tour. Spyware, virus, trojan, fake security or privacy alerts? Read the malware cleaning guide. Want to reply to a topic, start a new one, or remove the advertising? Join today (always free).
 
Reply to this topicStart new topic
Change format from text to date in Access table
non_haiku
post Jan 30 2007, 10:33 AM
Post #1


New Member
*
Posts: 9
OS: XP



Hi folks, I'm having a little trouble with my Access database. The previous database manager has a table with fields for month as text format and not time or date. Unfortunately, I need to calculate the length of an event occurring (the length of flowering time from when it starts to when it ends in terms of the number of months) and I can't do that with the field in the text format. Is there a way that I can convert the data from text format to time format (only as the month, not as a full date like 1/1/2007)? I've tried to figure this out a number of ways, including update queries with new fields, but I always get an error message.

Thanks for the help!

This post has been edited by non_haiku: Jan 30 2007, 10:33 AM
Go to the top of the page
 
+Quote Post
Piper
post Jan 30 2007, 11:46 AM
Post #2


Retired Staff
Group Icon
Posts: 2,459
From: USA
OS: Windows XP



What version of Access?

How are the dates (or months) entered now?
Go to the top of the page
 
+Quote Post
non_haiku
post Jan 30 2007, 12:18 PM
Post #3


New Member
*
Posts: 9
OS: XP



I have the most recent version of Access (i.e. before Office 2007)

Right now, the fields for Start Flower and End Flower are in text format. Anyone who enters the info simply selects the month from a drop-down list. For example, if the species starts flowering in March, then the word "March" is selected from the drop down list.

This post has been edited by non_haiku: Jan 30 2007, 12:18 PM
Go to the top of the page
 
+Quote Post
Piper
post Jan 30 2007, 01:56 PM
Post #4


Retired Staff
Group Icon
Posts: 2,459
From: USA
OS: Windows XP



There are a couple of options:

1. Leave the original month field alone, and create a query with an expression (iif([start]="Jan",01,iif([start]="Feb",02, and so on). Then use the query as the basis for all reports, etc.

2. Do an Update Query to replace the words with numbers. After you've replaced everything, change the field type to number. If you change the field type to number while there's non-numeric data in the field, you'll lose that data. The trick with the Update Query is you have to do one month at a time. Here's a screen shot.

I just saw that I queried "Mar" and replaced it with "01" wacko.gif

If you need additional assistance, please post back. Good luck!
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies / Views Topic Information
No New Posts   1 / 203 5th March 2006 - 05:56 PM
LawrenceFamily99 started - last by SRX660
No New Posts   0 / 158 19th August 2008 - 12:49 AM
suprra started - last by suprra
No New Posts   2 / 318 23rd August 2008 - 03:22 PM
termin8or2 started - last by termin8or2
No New Posts   4 / 230 9th September 2008 - 10:43 AM
Kalian started - last by coachwife6

RSS Time is now: 5th December 2008 - 04:52 AM
Advertisements do not imply our endorsement of that product or service. The forum is run by volunteers who donate their time and expertise. We make every attempt to ensure that the help and advice posted is accurate and will not cause harm to your computer. However, we do not guarantee that they are accurate and they are to be used at your own risk.