Query abt

Last Edited By Krjb Donovan
Last Updated: Mar 05, 2014 09:51 PM GMT

QuestionEdit

how to saprate date and time insheet

AnswerEdit

Shenaz

Date and time are stored as the elapsed number of days form a base date.

In Windows, the default base date is the turn of the century in 1900.

so today is 40248.

6 AM today would be 1/4 of a day so today as 6 AM is 40248.25

Say

Mar 11, 2010 6:00:00 AM is stored in A2 as a Date/Time serial number

in B2 =Trunc(A1) formatted as a Date will give you the date portion. Mar 11, 2010

in C2

=A2-trunc(B2) formatted as Time will give you the time portion. 6:00:00 AM

As a ready reference if you are interested, you can find a wealth of information on working with dates and times at Chip Pearson's site

http://www.cpearson.com/excel/datetime.htm#AddingDates is a good intro to his information. At the bottom of the page are links to other date and time related pages on his site.

Advertisement

©2024 eLuminary LLC. All rights reserved.