SQLSeTTeR (7/31/2014)
Does anyone have a script handy to fill in a century into a date string. Right now, I'm getting dates in the following format:7/26/29 = converts to 2029.
I'm looking for a SQL statement that will now to put a 19 or 20 in the century.
First, SQL Servers default configuration is that when given a 2 digit century anything less than 50 is considered 20+ and anything greater than or equal to 50 is 19+.
Showing us just the date 7/26/29 really tells us nothing. You later posts tell us this is a birthday, 7/26/1929. How were we to know?
Still, you have given use little information to go on to really help. There is no magical function to add 20 or 19 to a date. Without a consistent rule to write such a function again, not much we can do to help.
So what is the criteria for determining if the year belongs in the 1900's or 2000's?