Picking current date but changing when viewing the case

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Picking current date but changing when viewing the case

Post by josh »

For numeric items you can check for blank by comparing to notappl. If you are in system controlled mode you need to use visualvalue since you are in preproc so the field has not been completed yet.
PROC DATE
preproc
if visualvalue($) = notappl then
    $=
edit("99/99/99",sysdate("DDMMYY"));
endif;
tegegne mulu
Posts: 2
Joined: August 24th, 2020, 4:39 am

Re: Picking current date but changing when viewing the case

Post by tegegne mulu »

how I can use the system date format different from current date
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Picking current date but changing when viewing the case

Post by Gregory Martin »

The sysdate function returns the current date. If you have different dates that you want to use as a single number, then you can construct them yourself using math. For example, if I wanted February 1, 2020 in YYYYMMDD format I could write:
( ( 2020 * 10000 ) + 2 ) * 10 + 1
Post Reply