• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

DateValue Function

GN0001

Member
Hello,

I need to match two dates:

11/10/2012 to 11/10/2012

=11/10/2012=11/10/2012=True

It brings me false.

How can I fix this problem?


I use DateValue, but it brings #Value.

Is DataValue function a solution? if so, how should I use it?

Regards,
 
Good day GGGGG


Does this help

[pre]
Code:
A1	            B1	            C1
11/10/2012	10/10/2012	Wrong Date
11/10/2012	11/10/2012	TRUE
12/10/2012	09/10/2012	Wrong Date
13/10/2012	13/10/2012	TRUE
14/10/2012	14/09/1011	Wrong Date

code in C1
[/pre]

=IF(A2=B2,"True","Wrong Date")

`
 
Hi,


It looks like one of the dates are in text format, you could either fix that or use this


=IF(OR(A1=(A1+B1)/2,B1=(A1+B1)/2),TRUE,FALSE)
 
Hi ,


A date is basically a number ; to know whether the value in a cell is a number , you can use the =TYPE(...) function , where you need to replace the ... by the cell reference which contains the date you wish to check.


A real date will return 1 , whereas if the date is actually either entered as a text string ( prefixed by a single quote ) or entered in a cell which has been formatted as text , you will get 2.


The DATEVALUE function expects a string parameter ; if you use DATEVALUE with a numeric value , you will get a #VALUE! error.


So , if you are getting a #VALUE! error , it should mean that the concerned date value is a number.


Use DATEVALUE with the date which returns 2 for the TYPE function e.g.


=A1=DATEVALUE(B1)


where A1 contains a valid date , and B1 contains an identical date value which is actually a text string , will return TRUE.


Narayan
 
Hello Narayank,


I am confused. I have two spreadsheets, I put type function on date column, first sheet returns 1 and the other one returns 2. I need both to be the same, both date or both string or both numbers?


How can I convert the date shows type 1 to string?


Thanks for the help.

Guity
 
Hi Guity ,


To convert a numeric value to a string , use the TEXT function with the required format e.g. if A1 contains a valid date , then =TEXT(A1,"dd-mm-yyyy") will convert it to a string with the specified format.


Narayan
 
Hello Narayank991,

What you said on the top help me a lot with my work tasks.Thanks a lot.

How can we convert the date which is entered as string to date(Number)?

GGGGG
 
Back
Top