Formatting Date values

Enchantix

New Member
Joined
Sep 20, 2015
Messages
34
Hello,

i import tables from excel on a monthly basis to an access 2007 table and the dates that are imported are in a Date/Time format (DD/MM/YYYY HH:MM:SS AM/PM).


im trying to change the date formate to short date only but when i change the format in table properties to short date. When i view table it shows with the time aswell for some of the date values.


ive tried putting DD/MM/YYYY in format but it still shows the time.


even when i ran a qry for the table the date field also showed the time at the end.


any help to fix this would be greatly appreciated.


thanks
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Formatting the date won't change the actual date value, formatting is purely for visual purposes in Excel.
To give you a better understanding of how Excel handles dates, you need to know that Excel counts the days from 01.01.1900 up until the date in question. So if you format a cell only containing a date as "General", you would get an integer like 42723. Knowing this, it is only logical that hours, minutes, seconds, etc. would be calculated as decimal numbers. 06.00 would be 0.25 (42723.25), 12.00 = 0.50, 18.00 = 0.75, so on...
To change the value you could simply use a formula to "extract" the date/remove the decimals:
=INT(A1)
(to say it more correctly, the formula converts a number to an integer)
 
Upvote 0
Thank You for clarifying how excel proccesses dates and how to go about formatting and achieving the desired result via the integer conversion. :)
 
Upvote 0
You can also change the format of date using the following formula;

=TEXT(given date or select cell containing date,"DD:MM:YYYY")

if cell A1= 12/21/2016 10:30

Then,

=TEXT(A1,"DD:MM:YYYY")
= 21:12:2016
 
Upvote 0

Forum statistics

Threads
1,221,780
Messages
6,161,888
Members
451,730
Latest member
BudgetGirl

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