Link to home
Start Free TrialLog in
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
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

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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

ASKER

Gustav this worked.
Great!

/gustav