1
I have a form
and in that form
I have two date fields, the campodata1
and completed by the user and the campodata2
and filled by the database, now I need a code to compare if these two fields are with the same information.
The fields are string same I am using in the form o masktext
for data fields, I just need to compare to see if they are the same to do an action.
what types of your dates ? fields and what kind of application are you using ? have you tried anything?
– Marco Souza
The fields are string I’m using in the form the masktext for data fields, I just need to compare to see if they are equal to do an action.
– Junior Guerreiro
edit your question with this information and give an example of two dates.
– Marco Souza
try the following
(campodata1 - campodata2).TotalDays
if the return is zero are equal, if it is greater than zero thecampodata1
is higher thancampodata2
and if the return is less than zero the datecampodata1
is lower than that ofcampodata2
.– Gustavo Forte Andreli
That’s right, but the simplest comparison, I just need to compare if they’re the same...
– Junior Guerreiro