Avatar of mishlce
mishlce

asked on 

date/time format

I want to change coulumns A and B to look like Columns C and D in access 2003.  Pls provide formula.
date-timeformat.xls
Microsoft Access

Avatar of undefined
Last Comment
Gustav Brock
Avatar of caltain
caltain
Flag of United States of America image

I understand from the Excel file that you are getting a date/time field from the SQL end that is formatted as:
    2012-12-17 01:03:23.000
You would prefer the format to be:
    12/17/2012  1:03:00 AM

There are at least a dozen ways to accomplish what you want.  It could be fixed from the SQL end.  It could be imported to Access with a field definition that accounts for the changes.  It could be stored exactly like the SQL source format, or it could be stored as your preferred format.  Either way, it could be displayed, printed, or manipulated using any format you care to think up.  It could even be changed via an Excel macro or shell scripting between getting the data out of SQL and importing it to Access.

There really is no appropriate formula I could provide without more info about how you are getting the info from SQL, how you intend to import it into Access, how you intend to store it in your Access database, and how you want to use the information once it is properly imported into Access.  Are you using Visual Basic for Office, or just the stock realtime database interface that Access provides when you open the database?

More info, please...
Caltain
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Hamed Nasr
Hamed Nasr
Flag of Oman image

FORMAT ([START TIME], "mm/dd/yyyy hh:mm AM/PM")
FORMAT ([END TIME], "mm/dd/yyyy hh:mm AM/PM")
Avatar of mishlce
mishlce

ASKER

caltain,
The data is pulled from SQL by IT.  They place that data into an access databaseas a table that I utilize.  They are not going to change it on the SQL end, so I must format it in access to read as:  12/17/2012  1:03:00 AM.  In the access table it is formated as Text.  I have tried to change the formating to date/time but it will not convert.  It erases all.  I am wondering if there is a querie I can run in access to reformat it to date/time as requested.
Avatar of mishlce
mishlce

ASKER

Gustav this worked.
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Great!

/gustav
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo