MEDITECH Date Formatting & Other Date Solutions
Return yesterday’s date as YYYYMMDD: %Z.date.in("T-1").
Return yesterday’s date as: MM/DD/YY: %Z.date.out(%Z.date.in("T-1")).
Return a date from 4 days ago as YYYYMMDD: %Z.date.in.magic(@.sd-(86400*4)).
Return first day of the current month: %Z.date.in.magic(@.sd)^/D,/D$6_"01"^/DATE.
Return the number of days since the first day of the current month:
%Z.date.in.magic(@.sd)$6_"01"^/MON.START.DATE,
%Z.date.in.magic(@.sd)^/TODAY,
%Z.date.sub(/TODAY,/MON.START.DATE)^/MTD.DAYS
Return Start & Stop Date for Last 3 Months:
%Z.date.add(@.today$6_"01","0-1")^DATE^STOP.DATE,
%Z.date.add(DATE$6_"01","0-1")^DATE,
%Z.date.add(DATE$6_"01","0-1")^DATE,
DATE$6_"01"^START.DATE

0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home