Stefan Motz
asked on
How to replace the year in a date in SQL Server
Hi Experts,
I would like to replace the year part in a date in SQL Server.
I've tried the following, but I get this error message:
Msg 242, Level 16, State 3, Line 1
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
Thank you for your help
I would like to replace the year part in a date in SQL Server.
I've tried the following, but I get this error message:
Msg 242, Level 16, State 3, Line 1
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
UPDATE VacationBid
SET Day1 = REPLACE(Day1,'2014','1015')
WHERE Day1 LIKE '%2014%'
Thank you for your help
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
We aim to please.
Every once in awhile we get a question about Access 200, and it takes awhile to explain that the Romans' first couple of desktop database applications left a lot to be desired, and that 202 was really the first usable application.
Every once in awhile we get a question about Access 200, and it takes awhile to explain that the Romans' first couple of desktop database applications left a lot to be desired, and that 202 was really the first usable application.
JH
I liked the old school overalls pic .. why so formal now ?
I liked the old school overalls pic .. why so formal now ?
When you blow two grand on family photos there's a strong desire to justify spending the money.
The previous photo was after a Tough Mudder I ran a couple of years ago.
If you think it's a better photo for EE then I'll put it back.
You're the first one that's commented on it.
The previous photo was after a Tough Mudder I ran a couple of years ago.
If you think it's a better photo for EE then I'll put it back.
You're the first one that's commented on it.
I hear that
that's why all family photos are taken with our cells :)
coming from the guy DJ'ing in his picture so what do I know :)
that's why all family photos are taken with our cells :)
coming from the guy DJ'ing in his picture so what do I know :)
ASKER
My users didn't want to travel back in time just to take vacation in year 1015.
Sorry, it was just a typo.