Formatting Months Days and Years to mm dd yy within Parameters in OpenGate

Home/Support/OpenGate/Formatting Months Days and Years to mm dd yy within Parameters in OpenGate

Home Forums Support OpenGate Formatting Months Days and Years to mm dd yy within Parameters in OpenGate

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Shawn Kenny
    Keymaster
    Post count: 27

    Parameters withing OpenGate queries are efficient ways of passing in variables without sacrificing the query build time every time the query is executed. In some cases users will want to pass in dates in a specific format other than YYYYMMDD. The example below shows how to format the between date values in “MMDDYY”

    Parameter THRU
    Parameter FROM
    
    THRU^INPUT,
    %Z.date.in(IF{INPUT%3^Y<80 INPUT$4_"20"_Y;INPUT})^THRU1,
    
    FROM^INPUT,
    %Z.date.in(IF{INPUT%3^Y<80 INPUT$4_"20"_Y;INPUT})^FROM1,
    
    Select
    ADM.PAT.name, ADM.PAT.admit.date
    from ADM.PAT.room.bed.index
    Join ADM.PAT.main
    where ADM.PAT.admit.date <= THRU1
    and ADM.PAT.admit.date >= FROM1
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

Blue Elm Eventts

December 2018
S M T W T F S
« Aug    
 1
2345678
9101112131415
16171819202122
23242526272829
3031