merging fields together?

nashie

New member
Local time
Today, 23:13
Joined
Jun 3, 2003
Messages
9
can you merge database columns together.

i have a date column and i have a time column but i need to have a 'date/time' column and therefore need to merge them together.

can access do this?
 
I'm not sure. But you can probably get two columns to look like one by erasing the line.
Ps, I realize that this isn't very helpful.
Sorry
 
=[Field1]&[Field2] as the control source for an unbound textbox
 
hmmm, well all i gotta do is clean it up and then it gets put into a SQL db. so doesn't matter what form i do this work in so i may just whack it in excel, i know how to merge in that.
 
Rich said:
=[Field1]&[Field2] as the control source for an unbound textbox

me access n00b.
me not understand...

in other words. please elaborate on what i need to do. i am not very familiar with working with access, only times i deal with it is by connecting with asp and stuff.
 
hmmmm

still can't do it.

i've created a new field with the hope of setting it to equal date + time...

how can this be done??

anyone??

surely there must be a way to do this.

i only want to put 2 columns together, its only a merge operation...

:|
 
I'm guessing you want to merge the fields in a query. Hopefully both fields have the date/time format. In design view, in the first row of a column type [date]+[time]. Run the query and the output should work. If the fields are formatted text or something else, you'll have to try and convert to date/time first.
 
Here: I put the CDate() function in too, just in case!
 

Attachments

mmmm, i'm getting an error saying:

extra ) in query expression 'new.[CDate([Date]+[Time])]'

???
 
nashie said:
new.[CDate([Date]+[Time])]

First off, having fields called Date and Time is going to cause problems as they are reserved words in Access due to the Date() and Time() functions.

If your table is called new, what you'd want is:

CDate(new.[Date] + new.[Time])
 
ok, tried pasting the new data into my new column in the db, but the only thing i can find is paste append so it just ends up adding them on. can i paste over the original date field or at least match the new data to the appropriate record and delete the old date column???
 
An UPDATE query would be much faster.
 

Users who are viewing this thread

Back
Top Bottom