Posted on: 8/25/2013 10:48:22 PM | Views : 906

Users of our app currently store date values in following format: Sept. 23, 2013 We would like to convert these date values to MM/dd/yyyy and the code below does just that.
SELECT CONVERT(VARCHAR(10), CONVERT(DATETIME, SUBSTRING('Sept. 23, 2013', 0, 4) + ' ' + SUBSTRING('Sept. 23, 2013',6,9), 107), 101) When we run this code, now, we get above date, for instance, formatted to 9/23/2013.
However, the issue we have now is that when we try to update same date value, it produces a value like:
Sep 23 2013 12:00AM

Notice that first, Sept. is now Sep which is wrong because t and period (.) are missing.
Simply put, when we update a date value, it needs to follow similar format as this -> Sept. 23, 2013
Any ideas how to modify above query to produce similar result when a date value is updated?

Thanks a ...

Go to the complete details ...