Need technical understanding on Formula

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Dates and times are numbers.
DATEVALUE and TIMEVALUE convert text (formatted) dates and times to true dates and times.

Row\Col
A​
B​
C​
D​
E​
1​
inputisnumber?datevalueisnumber?
2​
[1]5/8/2018
FALSE​
43228​
TRUE​
3​
[2]May 8 2018
FALSE​
#VALUE!​
FALSE​
4​
[3]5/8/2018
FALSE​
43228​
TRUE​
5​
[4]
5/8/2018​
TRUE​
#VALUE!​
FALSE​
6​
[5]08-05-18
FALSE​
43317​
TRUE​
7​

C2 houses:

=ISNUMBER(B2)

which is copied down.

D2 houses:

=DATEVALUE(B2)

which is copied down.

E2 houses again an isnumber test:

=ISNUMBER(D2)

copied down.

[1] contains:

'5/8/2018

[2] contains:

May 8 2018

[3] contains:

="5/8/2018"

[4] contains:

=TODAY()

[5] contains:

=TEXT(TODAY(),"dd-mm-yy")

The foregoing can be easily set up to observe the behavior of TIMEVALUE.

By the way, the following is what the 2016 version writes about DATEVALUE...
"DATEVALUE function This article describes the formula syntax and usage of the DATEVALUE function in Microsoft Excel. The DATEVALUE function converts a date that is stored as text to a serial number that Excel recognizes as a date. For example, the formula =DATEVALUE("1/1/2008") returns 39448, the serial number of the date 1/1/2008."
 
Upvote 0
Dear Sir,
Really appreciate your explanation. Just I did understand that, it only help us to give date in number format (i.e. actual format).
Thank You for this..

But why someone will use this formula..? Reason I'm asking this, I now cant find this formula much helpful while working..

Dates and times are numbers.
DATEVALUE and TIMEVALUE convert text (formatted) dates and times to true dates and times.

Row\Col
A​
B​
C​
D​
E​
1​
inputisnumber?datevalueisnumber?
2​
[1]5/8/2018
FALSE​
43228​
TRUE​
3​
[2]May 8 2018
FALSE​
#VALUE!​
FALSE​
4​
[3]5/8/2018
FALSE​
43228​
TRUE​
5​
[4]
5/8/2018​
TRUE​
#VALUE!​
FALSE​
6​
[5]08-05-18
FALSE​
43317​
TRUE​
7​

<tbody>
</tbody>


C2 houses:

=ISNUMBER(B2)

which is copied down.

D2 houses:

=DATEVALUE(B2)

which is copied down.

E2 houses again an isnumber test:

=ISNUMBER(D2)

copied down.

[1] contains:

'5/8/2018

[2] contains:

May 8 2018

[3] contains:

="5/8/2018"

[4] contains:

=TODAY()

[5] contains:

=TEXT(TODAY(),"dd-mm-yy")

The foregoing can be easily set up to observe the behavior of TIMEVALUE.

By the way, the following is what the 2016 version writes about DATEVALUE...
"DATEVALUE function This article describes the formula syntax and usage of the DATEVALUE function in Microsoft Excel. The DATEVALUE function converts a date that is stored as text to a serial number that Excel recognizes as a date. For example, the formula =DATEVALUE("1/1/2008") returns 39448, the serial number of the date 1/1/2008."
 
Upvote 0
You might get data files with text formatted dates which you need to convert. One method is to run DATEVALUE on such data.

By the way, when A2 contains a text formatted date...

=DATEVALUE(A2)

is equivalent to

=A2+0

when trying to convert.
 
Upvote 0

Forum statistics

Threads
1,217,347
Messages
6,136,046
Members
449,984
Latest member
Ffprojectjkt

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