Hello,
I am having trouble converting a date to YYYYMMDD. I have used the CONVERT logic but the cahnges does not seem to be taking place when I run the code in query analyzer.
Here is my code:
select TOP 5
[EMPLOYEE],
[INCID_STATUS],
[COST],
CONVERT(VARCHAR(8),R_DATE,112) AS R_DATE
from [LawITTest].[dbo].[tmpOSHA]
Here is the output:
EMPLOYEE INCID_STATUS COST R_DATE
----------- ------------ ------------- --------
17524 CLOSED 1500.00 1142003
15251 CLOSED .00 1232003
12306 CLOSED .00 2042003
2945 CLOSED .00 1282003
21709 CLOSED 1225.00 2192003
Can anyone see what I may be doing wrong?
Thank you,
TomR100
I am having trouble converting a date to YYYYMMDD. I have used the CONVERT logic but the cahnges does not seem to be taking place when I run the code in query analyzer.
Here is my code:
select TOP 5
[EMPLOYEE],
[INCID_STATUS],
[COST],
CONVERT(VARCHAR(8),R_DATE,112) AS R_DATE
from [LawITTest].[dbo].[tmpOSHA]
Here is the output:
EMPLOYEE INCID_STATUS COST R_DATE
----------- ------------ ------------- --------
17524 CLOSED 1500.00 1142003
15251 CLOSED .00 1232003
12306 CLOSED .00 2042003
2945 CLOSED .00 1282003
21709 CLOSED 1225.00 2192003
Can anyone see what I may be doing wrong?
Thank you,
TomR100