Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem combining date fields into a created field

Status
Not open for further replies.

ja01

Technical User
Dec 14, 2005
48
0
0
US
I have a created field in Access called Birthdate(text)which is blank. I want to pulled 3 fields, birthm(text) birthd(text) and birthyr(text) into the created field called Birthdate. The display should read MMDDYYYY (ie 09112007). In the query section in Access, must I do an update query and some time of formula to concatenate the 3 fields and then combine them into one? Assumning I do an update query, Here is my assumption here:
Field: Birthdate
Table: the actual table
Update to: ???
Need some help here
 
You shouldn't need to store the combined value since it can be easily calculated on the fly in a query or where ever needed:
BirthMMDDYYYY: birthm & birthd & birthyr
IMHO you should store the birthday in a date/time field. You can then separate into day, month, and year as needed. You could also, easily calculate age from the birthdate field.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 




and...

the absolutely worse thing to do, adding insult to injury, is to store your birthdate as a mmddyyyy STRING, that will not collate in a correct way, rendering it about as useful as a piece of paper in a file cabinet, ie
[tt]
01012007
12312006
[/tt]
This is how these two "date" will sort, because "0" sorts before "1", but it is OBVIOUSLY incorrect. You cannot do arithmetic on these "dates". Oh, the humanity!!!!


Skip,
[sub]
[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top