![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
I can't see how adding integer values (the fcns Year, Day, month return Integer values) and to "-" chars is going to give you what you expect? If this is really the code you're using then make sure you're getting the date out (DTSSource("DB_KEY2_PRI_INV_DATE_8")) the way you expect. Look at the differences here and see if you don't have a similiar thing going on declare @invmo int, @invday int, @invyear int set @invmo = Month(getdate()) set @invday = Day(getdate()) set @invyear = Year(getdate()) select @invmo + "-" + @invday + "-" + @invyear print "versus" select convert(varchar, @invmo) + "-" + convert(varchar, @invday) + "-" + convert(varchar, @invyear) Returns ----------- 2037 versus -------------------------------------------------------------------------------------------- 12-20-2005 Determine your desired output format and work from there. |
#4
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |