I have one string ,it's look like a date format is 01/04/2013
For string date="01/04/2013"
The above string format lik a : 01 is Date , 04 is Month , and 2013 year .
Now i am using convert.todatetime()
See below :
DateTime **DateTimeValue** =Convert.ToDateTime(date);
The DateTimeValue return in my system : 01-04-2013T00:00:00
// Date 1st and month 2nd
But when converting the same DateTimeValue is return on other system :04-01-2013T00:00:00
//Month 1st and date 2nd
Why The Convert.DateTime()
is return different ,different date in different system ????
Answer :
Now I changed my DataBase Coloumn DataType DateTime to Nvarchar . So I Shouldn't want convert To DateTime . and this is working in all system .
Thanks guy's