Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default which function to use: in conversion of date and hour to day/night

why do u use mod?
cell a1=1/1/08 08:00:00 AM, cell a2= 1/1/08 22:00:00 PM
cell b1 or b2= day/night
what should be the syntax?
thanks to anyone who can help with this.

"kbee" wrote:

I need to convert the data from a cell that contains date and time to a
different cell that will give a result of day /night, which functions should
I use and what will be their syntax?
if the hours i refere to as day are 7:00AM-18:00PM, and night 18:00Pm-07:00AM
thank you

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default which function to use: in conversion of date and hour to day/night

Dates in Excel are maintained as whole numbers. Jan 1, 1900 is day 1, Feb
12, 2008 is day 39,340 and Excel's highest date, Dec 31, 9999 is day
2,948,465.
Times in Excel are maintained as decimal fractions of 24 hours. So,
12:00AM, midnight, is 0.000000, 12:01 AM, 1 minute after midnight is
0.000694. (1/(24*60)
1am is 1/24 = 0.041667. 12PM noon is 12/25 = .5 so noon on Feb 12, 2008 is:
39340.5 If there is no date, the time is simply 0.5 Using =MOD(39340.5,1)
produces the remainder after dividing by 1, i.e. 0.5, the time portion of
the date/time. Most books on Excel explain this.

Tyro


"kbee" wrote in message
...
why do u use mod?
cell a1=1/1/08 08:00:00 AM, cell a2= 1/1/08 22:00:00 PM
cell b1 or b2= day/night
what should be the syntax?
thanks to anyone who can help with this.

"kbee" wrote:

I need to convert the data from a cell that contains date and time to a
different cell that will give a result of day /night, which functions
should
I use and what will be their syntax?
if the hours i refere to as day are 7:00AM-18:00PM, and night
18:00Pm-07:00AM
thank you



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default which function to use: in conversion of date and hour to day/night

Correction

12/24 is noon 0.5

Tyro


"Tyro" wrote in message
...
Dates in Excel are maintained as whole numbers. Jan 1, 1900 is day 1, Feb
12, 2008 is day 39,340 and Excel's highest date, Dec 31, 9999 is day
2,948,465.
Times in Excel are maintained as decimal fractions of 24 hours. So,
12:00AM, midnight, is 0.000000, 12:01 AM, 1 minute after midnight is
0.000694. (1/(24*60)
1am is 1/24 = 0.041667. 12PM noon is 12/25 = .5 so noon on Feb 12, 2008
is: 39340.5 If there is no date, the time is simply 0.5 Using
=MOD(39340.5,1) produces the remainder after dividing by 1, i.e. 0.5, the
time portion of the date/time. Most books on Excel explain this.

Tyro


"kbee" wrote in message
...
why do u use mod?
cell a1=1/1/08 08:00:00 AM, cell a2= 1/1/08 22:00:00 PM
cell b1 or b2= day/night
what should be the syntax?
thanks to anyone who can help with this.

"kbee" wrote:

I need to convert the data from a cell that contains date and time to a
different cell that will give a result of day /night, which functions
should
I use and what will be their syntax?
if the hours i refere to as day are 7:00AM-18:00PM, and night
18:00Pm-07:00AM
thank you





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default which function to use: in conversion of date and hour to day/night

I already gave you the formula. If you choose not to use it, ok!

Tyro

"kbee" wrote in message
...
why do u use mod?
cell a1=1/1/08 08:00:00 AM, cell a2= 1/1/08 22:00:00 PM
cell b1 or b2= day/night
what should be the syntax?
thanks to anyone who can help with this.

"kbee" wrote:

I need to convert the data from a cell that contains date and time to a
different cell that will give a result of day /night, which functions
should
I use and what will be their syntax?
if the hours i refere to as day are 7:00AM-18:00PM, and night
18:00Pm-07:00AM
thank you



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default which function to use: in conversion of date and hour to day/n

Thank you for your atempt but the suggestion did not yield the result, and i
dont know how to correct it.
thanx again

"Tyro" wrote:

I already gave you the formula. If you choose not to use it, ok!

Tyro

"kbee" wrote in message
...
why do u use mod?
cell a1=1/1/08 08:00:00 AM, cell a2= 1/1/08 22:00:00 PM
cell b1 or b2= day/night
what should be the syntax?
thanks to anyone who can help with this.

"kbee" wrote:

I need to convert the data from a cell that contains date and time to a
different cell that will give a result of day /night, which functions
should
I use and what will be their syntax?
if the hours i refere to as day are 7:00AM-18:00PM, and night
18:00Pm-07:00AM
thank you




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
iwhich funvtion to use : in conversion of date and hour to day and Tyro[_2_] Excel Worksheet Functions 1 February 14th 08 05:49 AM
iwhich funvtion to use : in conversion of date and hour to day and Teethless mama Excel Worksheet Functions 1 February 13th 08 03:18 AM
Count by date and hour ChristiaanV Excel Worksheet Functions 4 August 12th 06 12:26 AM
Hour() function Steven Excel Worksheet Functions 4 October 12th 05 10:22 AM
Subtracting date:hour from date:hour [email protected] Excel Worksheet Functions 4 August 26th 05 08:35 AM


All times are GMT +1. The time now is 09:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"