On 17/12/2013 00:17, Wjhonson wrote:
What is the last Thursday of the current month.
Current Date minus Current Day of Month number plus 1 puts you on the first of
the current month
Or you could just Oconv d2/ and replace the middle number with 01 with Iconv
that.
Actually, I think that'll screw up pretty spectacularly! OCONV(@TODAY,
"D2") gives me "17/12/13". If I replace the middle number (or if Kevin
replaced the middle number) we'd both end up somewhere in January! Why
do you Yanks put the least significant number in the middle? That's crazy!
If you want the first of the month, the easiest way to do it is
FIRST = "01/":OCONV(@TODAY,"D2[M,Y]")
(if I've remembered my syntax correctly). Then to get that into internal
format
I_FIRST = ICONV(FIRST, "D2DMY")
You should NEVER assume that dates are in the format you expect, unless
you are in control (which you aren't, here, seeing as you've messed up
pretty spectacularly :-)
Cheers,
Wol
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users