Hay.. I am facing a problem, I am getting a string ‘strData’ which contain user search value.
I am splitting that string by space and putting in array. how can i check that the string which i getting from array is date or not? if is it date type so i will need to convert it in datetime.
I am using MySql as a database. I am doing like this
DATE_FORMAT(ProjectDueDate, '%m/%d/%Y') like '%3/9/2011%'
It is not working fine but if i take date like this '%03/09/2011%'
then its working fine. How can i handle date like '%3/9/2011%'
I am using c# with MySql
DateTime.TryParseI am assuming it because you are a c#/asp.net developer per your SO profile 🙂
Please tag the question with language/tool so as not leave people guessing.
EDIT:
How about
DATE_FORMAT(ProjectDueDate, '%c/%e/%Y')?This is derived as per mysql date format documentation here.
Hope that helps.