I want to convert a C# DateTime to \"YYYYMMDDHHMMSS\" format. But I don\'t find a built in method to get this format? Any comments?
After spent a lot of hours on Google search, I found the below solution as when I locally give date time, no exception while from other server, there was Error......... Date is not in proper format.. Before saving/ searching Text box date time in C#, just checking either the outer Serer Culture is same like database server culture.. Ex both should be "en-US" or must be both "en-GB" asp below snap shot.
Even with different date format like (dd/mm/yyyy) or (yyyy/mm/dd), it will save or search accurately.