Last post Sep 03, 2013 03:50 AM by Afzaal.Ahmad.Zeeshan
Sep 01, 2013 02:28 PM|Afzaal.Ahmad.Zeeshan|LINK
I am not able to understand why time stamp used in one block of code doesnotmatch the other, even the variable used is same.
In this picture you can see the comment was made just after a few minutes, but the TimeStamp is saved in a different manner, I was told about Culture, but thats not being used anywhere.
Everywhere, if the comment is on post then the timestamp is like this but on photos the timestamp is just like the one in the post.
The variable is same used:
var time = DateTime.Now;
In the post and photo.
Sep 01, 2013 02:30 PM|Afzaal.Ahmad.Zeeshan|LINK
Hehehe just found one error, the data type was set to nvarchar in the comment So it was being saved like that.
Sep 02, 2013 01:24 AM|Tear09|LINK
I would like to know why the type of nvarchar will effect the data. Could you provide the detail reason?
Sep 03, 2013 03:50 AM|Afzaal.Ahmad.Zeeshan|LINK
Hi, actually the code
gets the current time of the computer, and after you submit, it is saved based on the datatype of the Column. It was saved as that because it was allowing 'Sep' in other column it was DateTime so it had to convert the 'Sep' to '9'.