Question on Split one Column data in two Column

A

Alan Tang

Hello:

I have question on how to split one Column's data into another table
with 2 column.

E.G.
Original TEXT Field Column
08/01/2003 14:23:52.125

New Table
Column 1 Column 2
---------- -----------
01/08/2003 14:23:52


Column 1 is in (DD/MM/YYYY)
Column 2 is in (hh:mm:ss)

Thanks a lot!
 
D

Douglas J. Steele

You could use Left([MyField], InStr([MyField], " ") - 1) and Mid([MyField],
InStr([MyField], " ") + 1)

However, I think you'd be better off converting the Text field to a Date,
and store the entire timestamp in the single field. You can use DateValue
and TimeValue to extract whichever part you want.

--
Doug Steele, Microsoft Access MVP



Hello:
I have question on how to split one Column's data into another table
with 2 column.
E.G.
Original TEXT Field Column
08/01/2003 14:23:52.125

New Table
Column 1 Column 2
---------- -----------
01/08/2003 14:23:52

Column 1 is in (DD/MM/YYYY)
Column 2 is in (hh:mm:ss)
Thanks a lot!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top