Hi ... i'm sorry to hassle this user group but i have an urgent need
for some code - i have tried and tried to find a solutionn elsewhere -
but the problem is i don't really know what i am looking for.
What is the equivalent SLQ code for the below statement which works in
MS Access?
Format(7,"00")
Result: 07
or alternatively ...
what i am actually trying to do is return the string yyyymm based on
the current date. eg 200506 (June 2006)
Is there a simple way of doing this?
The code i am currently using is
CONVERT (char, DATEPART(yyyy, GETDATE())) + CONVERT (char, DATEPART(mm,
GETDATE()))
Result: 2005 !!!!
At least i thought i would get 20056. But obv what i am aiming for is
200506.
Thanks in advance.
TC
for some code - i have tried and tried to find a solutionn elsewhere -
but the problem is i don't really know what i am looking for.
What is the equivalent SLQ code for the below statement which works in
MS Access?
Format(7,"00")
Result: 07
or alternatively ...
what i am actually trying to do is return the string yyyymm based on
the current date. eg 200506 (June 2006)
Is there a simple way of doing this?
The code i am currently using is
CONVERT (char, DATEPART(yyyy, GETDATE())) + CONVERT (char, DATEPART(mm,
GETDATE()))
Result: 2005 !!!!
At least i thought i would get 20056. But obv what i am aiming for is
200506.
Thanks in advance.
TC
Comment