access date and time formatted as text - formula to convert it to an actual date/time field when run as a MakeTable?

meekag

New Member
Joined
Aug 2, 2017
Messages
1
Hi,

Is there a formula that will make Access recognize a date and time formatted as text as a Access Date/Time field? A lot of times I have wonky source data and bring in dates/times as text when I import to avoid paste errors related to those fields. Then I format them as dates/times through queries (and eventually use a formula that concatenates my individual date and time fields. At the moment I am using the formula ArrivalDateTime: Format([Patient Arrival Date] & " " & [(T) Patient Arrival Time],"m/d/yyyy h:mm:ss am/pm"). When I run my Make Table on the query using my concatenated date and time as text, that field is text until I go in to the table I made and manually change the Data Type to Date/Time in design view. I would like for the field to automatically be recognized as a Date/Time when I run the make table query. Down the line I need to be able to do calcs on the ArrivalDateTime field (using my other Date/Time field - DepartureDateTime).

I tried to find guidance on writing the statement as a date and time but I ended up with the aforementioned statement because I couldn't find anything - if there is something out there I apologize for being redundant to this forum, and am hopeful someone will send a link.

Thanks for any help, it is appreciated!
 

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.
If you're saying you want to alter a table field from text data type to date time there is no query that can do this - it's a vba operation that I suspect you should avoid. Perhaps what you're really on about isn't necessary anyway. Much of this sort of data representation is easily achieved with forms or reports. Perhaps some sample data, the desired results and the reason for the manipulation will get you more focused answers.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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