Date & Time Convert to Numeric Value

M

Monica Murray

I have two columns formatted to enter dates & time,
i.e. dd/mm/yyyy hh/mm. I want to convert to numeric value,
to calculate difference total diff of days / hrs or mins.
I can convert date or time, but can I do both together as
one calculation.
I would be grateful if you could advise me of a suitable
formula.
Thanks.
 
P

Peo Sjoblom

Yes, just do

=cell_with_end_date_time - cell_with_start_date_time

could look like

=B1-A1

format to your liking although if you want hours you have to
use [hh]:mm for plus 24 hours..
 
M

Monica

When I enter formula as below, i.e. =B1-A1, Excel returns
a #value ?
Thanks for your help.
-----Original Message-----
Yes, just do

=cell_with_end_date_time - cell_with_start_date_time

could look like

=B1-A1

format to your liking although if you want hours you have to
use [hh]:mm for plus 24 hours..

--

Regards,

Peo Sjoblom


I have two columns formatted to enter dates & time,
i.e. dd/mm/yyyy hh/mm. I want to convert to numeric value,
to calculate difference total diff of days / hrs or mins.
I can convert date or time, but can I do both together as
one calculation.
I would be grateful if you could advise me of a suitable
formula.
Thanks.


.
 
P

Peo Sjoblom

That was easy enough, that means that your dates are text that excel cannot
convert using an operand, have you imported these values, can you show
an example (copy from one cell and paste into the reply window)?

--

Regards,

Peo Sjoblom


Monica said:
When I enter formula as below, i.e. =B1-A1, Excel returns
a #value ?
Thanks for your help.
-----Original Message-----
Yes, just do

=cell_with_end_date_time - cell_with_start_date_time

could look like

=B1-A1

format to your liking although if you want hours you have to
use [hh]:mm for plus 24 hours..

--

Regards,

Peo Sjoblom


I have two columns formatted to enter dates & time,
i.e. dd/mm/yyyy hh/mm. I want to convert to numeric value,
to calculate difference total diff of days / hrs or mins.
I can convert date or time, but can I do both together as
one calculation.
I would be grateful if you could advise me of a suitable
formula.
Thanks.


.
 
M

Monica Murray

Date has been manually entered and I have formatted cell
as a date / time.
Example of data:
8/26/03 13:30
~Thanks for your help.
Monica


-----Original Message-----
That was easy enough, that means that your dates are text that excel cannot
convert using an operand, have you imported these values, can you show
an example (copy from one cell and paste into the reply window)?

--

Regards,

Peo Sjoblom


Monica said:
When I enter formula as below, i.e. =B1-A1, Excel returns
a #value ?
Thanks for your help.
-----Original Message-----
Yes, just do

=cell_with_end_date_time - cell_with_start_date_time

could look like

=B1-A1

format to your liking although if you want hours you
have
to
use [hh]:mm for plus 24 hours..

--

Regards,

Peo Sjoblom


I have two columns formatted to enter dates & time,
i.e. dd/mm/yyyy hh/mm. I want to convert to numeric value,
to calculate difference total diff of days / hrs or mins.
I can convert date or time, but can I do both
together
as
one calculation.
I would be grateful if you could advise me of a suitable
formula.
Thanks.




.


.
 
P

Peo Sjoblom

The only way you would get a value error involving dates is that
they somehow are seen as text. Do as follows, press F5, select special,
select constants, uncheck everything but text and click OK.
Do any of the cells get selected?

Btw, you have UK email address, you realize that the default date format is
not
mm/dd/yy? I believe UK has dd/mm/yy, that would explain it since if I type
26/08/03 it will be text. If you are sending this to US you don't have to
worry,
it will be converted. If you insist using US dates you have to change the
regional
settings in the control panel to the US date format

--

Regards,

Peo Sjoblom


Monica Murray said:
Date has been manually entered and I have formatted cell
as a date / time.
Example of data:
8/26/03 13:30
~Thanks for your help.
Monica


-----Original Message-----
That was easy enough, that means that your dates are text that excel cannot
convert using an operand, have you imported these values, can you show
an example (copy from one cell and paste into the reply window)?

--

Regards,

Peo Sjoblom


Monica said:
When I enter formula as below, i.e. =B1-A1, Excel returns
a #value ?
Thanks for your help.

-----Original Message-----
Yes, just do

=cell_with_end_date_time - cell_with_start_date_time

could look like

=B1-A1

format to your liking although if you want hours you have
to
use [hh]:mm for plus 24 hours..

--

Regards,

Peo Sjoblom


message
I have two columns formatted to enter dates & time,
i.e. dd/mm/yyyy hh/mm. I want to convert to numeric
value,
to calculate difference total diff of days / hrs or
mins.
I can convert date or time, but can I do both together
as
one calculation.
I would be grateful if you could advise me of a suitable
formula.
Thanks.




.


.
 
M

Monica Murray

You were correct. I have now reverted back to using UK
style date and set my regional settings to the same,and I
now have the calculations working. I have formatted the
cell, by selecting, custom, dd:hh:mm, and I now have my
data displayed correctly.
Many thanks for your help.
-----Original Message-----
The only way you would get a value error involving dates is that
they somehow are seen as text. Do as follows, press F5, select special,
select constants, uncheck everything but text and click OK.
Do any of the cells get selected?

Btw, you have UK email address, you realize that the default date format is
not
mm/dd/yy? I believe UK has dd/mm/yy, that would explain it since if I type
26/08/03 it will be text. If you are sending this to US you don't have to
worry,
it will be converted. If you insist using US dates you have to change the
regional
settings in the control panel to the US date format

--

Regards,

Peo Sjoblom


Date has been manually entered and I have formatted cell
as a date / time.
Example of data:
8/26/03 13:30
~Thanks for your help.
Monica


-----Original Message-----
That was easy enough, that means that your dates are
text
that excel cannot
convert using an operand, have you imported these
values,
can you show
an example (copy from one cell and paste into the reply window)?

--

Regards,

Peo Sjoblom


When I enter formula as below, i.e. =B1-A1, Excel returns
a #value ?
Thanks for your help.

-----Original Message-----
Yes, just do

=cell_with_end_date_time - cell_with_start_date_time

could look like

=B1-A1

format to your liking although if you want hours you have
to
use [hh]:mm for plus 24 hours..

--

Regards,

Peo Sjoblom


message
I have two columns formatted to enter dates & time,
i.e. dd/mm/yyyy hh/mm. I want to convert to numeric
value,
to calculate difference total diff of days / hrs or
mins.
I can convert date or time, but can I do both together
as
one calculation.
I would be grateful if you could advise me of a suitable
formula.
Thanks.




.



.



.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top