Date and Time conversion

gpouliot

New Member
Joined
Jan 19, 2009
Messages
39
Hi,

I have two fields in my database TRAN_DATE and TIME

My TRAN_DATE is in the following format 20091215 (Text). I would like to format it in the following 12/15/2009?

And my TIME is the following 133502 (Text). I would like to format it in the following 13:35:02 HH:MM:SS

Any help would be appreciated.

Thanks
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Firstly, the word "Time" is a reserved word in Access and may cause you some issues in the future. You may wish to change the field name to avoid any issues. Here is a complete list of reserved words.

http://support.microsoft.com/kb/209187

As to the formatting, I think you can use the DateSerial and TimeSerial Formula in a query to manipulate the data. You will have to combine this formula with the Left and Right Formula to get the proper separations.

For information on these formulae and their syntax look at this site.

http://www.techonthenet.com/access/functions/index.php

Alan
 
Upvote 0

Forum statistics

Threads
1,214,908
Messages
6,122,187
Members
449,071
Latest member
cdnMech

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top