G
grrr223
My ERP software stores all dates as integers. So originally, I wrote
T-SQL function to convert these integer dates to normal people dates i
the query I use as the recordset for my report. Well...that worked fin
on 1,000 rows, but NOT for 100,000. So I've figured out that if
convert my normal person date parameter to an integer date, then SQ
only has to convert my 1 parameter instead of having to convert 100,00
fields, (actually, 300,000 because I have 3 date columns).
So my question is, what is the best way to do this? This is what I hav
so far:
SET @Macola = Cast(Datepart(yy,@MacolaDate) as varchar)
Cast(Datepart(mm,@MacolaDate) as varchar)
Cast(Datepart(dd,@MacolaDate) as varchar)
However, I want the leading zeros for the month and day. For example i
I enter '1/1/2004' into this function, it returns 200411, but I need i
to return 20040101.
Any suggestions would be greatly apprectiated. Thank you
T-SQL function to convert these integer dates to normal people dates i
the query I use as the recordset for my report. Well...that worked fin
on 1,000 rows, but NOT for 100,000. So I've figured out that if
convert my normal person date parameter to an integer date, then SQ
only has to convert my 1 parameter instead of having to convert 100,00
fields, (actually, 300,000 because I have 3 date columns).
So my question is, what is the best way to do this? This is what I hav
so far:
SET @Macola = Cast(Datepart(yy,@MacolaDate) as varchar)
Cast(Datepart(mm,@MacolaDate) as varchar)
Cast(Datepart(dd,@MacolaDate) as varchar)
However, I want the leading zeros for the month and day. For example i
I enter '1/1/2004' into this function, it returns 200411, but I need i
to return 20040101.
Any suggestions would be greatly apprectiated. Thank you