Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
When I write month('2011-01-01') I get the answer 1,2,3,4,5,6,7,8,9,10,11,12 which is not what I want but i works when I write month('2011-02-01') it write feb and with month('2011-03-01') it write mar. How do I do to get jan with month('2011-01-01')? I use developer 8.5.
Hi,
Have you checked it in a text object? it should work fine. are you trying it with some field value or directly with string as you wrote in the post?
Regards, tresesco
Check the "SET MonthNames" line in your script:
If it contains numbers change it like this:
SET MonthNames = 'jan;feb;mar;apr...'
=Month
(Makedate(LEFT('2011-03-01',4),MID('2011-03-01',9,2),MID('2011-03-01',6,2)))
I have tried it in a textobject all 3 on the same time and got the answer 1,2,3,4,5,6,7,8,9,10,11,12 feb mar. I think it is strange that i work with feb and mar but with jan.
I have tried it it with string and with a field value.
This is not in a new application, it has worked severel months but suddenly get the wrong answer for 2011-01-01.