Trouble Importing Date Time Field in Access 2013

RHONDAK72

Board Regular
Joined
Dec 26, 2007
Messages
133
The SQL below returns the field ‘TABLE.LAST_DTTM_UPDATE’ in this format: 'YYYY-MM-DD-HH24.MI.SS.FF'.

Example field value: 01/14/2016 1:36:36PM

Unfortunately, I don’t have any way to change this format within the SQL. When I try to import the data into a new table of an Access 2013 database, I would like for this value to be in Date With Time format and not Short Text format. However, I receive errors in Access if I try to specify Date With Time format while importing the csv file via the Import Text Wizard. It will only let me import this field as a Short Text format.

Any ideas on what I can do to convert this field value from Short Text format to Date With Time format within Access 2013?

SQL:
SELECT DISTINCT TABLE.PO_ID, TO_CHAR(TABLE.PO_DT,'YYYY-MM-DD'), TABLE.PO_STATUS, TABLE.CHNG_ORD_BATCH, TO_CHAR(CAST((TABLE.LAST_DTTM_UPDATE) AS TIMESTAMP),'YYYY-MM-DD-HH24.MI.SS.FF')
FROM PS_PO_HDR A
WHERE ( TABLE.CHNG_ORD_BATCH > 0 )
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,215,660
Messages
6,126,088
Members
449,287
Latest member
lulu840

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