Page 1 of 1

day today - as400

Posted: Sun Jan 21, 2018 7:58 pm
by noamp
Hey everyone.
i using lansa on ibm i (as400) - i want to use in my program with the day ,
i need to know what day is it- if its sunday(1) or wednesday(2) on go on like that.
if someone know how to do that? thanks!

Re: day today - as400

Posted: Mon Jan 22, 2018 1:02 am
by jyoung
If you already have the date and it is a date type, you can you the AsDayOfWeek Intristic function.

http://docs.lansa.com/14/en/lansa016/pr ... ofweek.htm

If you don't have a date already the below works well for me.

Not at my PC so I winging this on my phone.

Code: Select all

#today := (*YYYYMMDD).AsDate(CCYYMMDD).AsDayOfWeek(SYMBOL)

Re: day today - as400

Posted: Mon Jan 22, 2018 8:03 pm
by noamp
hey, thanks for the help buy it is not on as400. the functions in lansa pc or what ever you using on is another commands from the ibm i (as400) commands. but thanks.

Re: day today - as400

Posted: Tue Jan 23, 2018 3:37 am
by atostaine
That code jyoung posted is RDMLX. That works on VL.