Another option, which I always have done, is to iconv dates in "15 Jan 2013" format. This always works regardless of which date method is selected.

Don't know why "yanks" do things that irritate you. But then, most people do things that irritate someone. As Mark Brown always points out; the trouble with standards is everybody has one. This seems more of an issue than what "yanks" do. :-)

Bill
Untitled Page


------------------------------------------------------------------------
----- Original Message -----
*From:* [email protected]
*To:* [email protected]
*Date:* 12/16/2013 6:00 PM
*Subject:* Re: [U2] [OT] Interview Questions
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
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to