Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all.
I need help to convert this sql to qv-script:
Convert(integer,substring(Month,1,4) + substring (Month,6,7) ) as YearMonthNum,
Where "Month" looks like "2009-08".
Thanks in advance.
left(Month, 4)*100 + right(Month, 2) as YearMonthNum
Best,
Peter
Did it work?
If so, please mark an answer to close this discussion. That makes it easier for us to track unanswered questions. Thanks.
Peter
I would instead use
Date(Date#(Month,'YYYY-MM'),'YYYY-MM')
Then you will get a proper dual value - a value with both a numeric (date serial number) and textual part.
HIC
Hi,
Try like this
=Date(Date#(Month, 'YYYY-MM'),'YYYY-MM')) AS
OR
=Date(MakeDate(Left(Month, 4), Right(Month, 2)), 'YYYY-MM')
Hope this helps you.
Regards,
Jagan.