Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #31044

    Paul Frishert
    Participant

    I am trying to convert the DOB field from PER in a report to show only the date, but I do not succeed using this: “cast(patientper.dob as DATE) as geboorte”. This shows the date as well as the time.
    I have tried a lot, but nothing seems to work.
    What command/format can I use in the source editor? Or is there a way to do the formatting in report design?

    #32365

    William
    Keymaster

    Thanks for the post. Which report are you trying to edit? The reason why i ask is with each report type (Layout/Grid/Document Template) there is a slightly different way of editing the date.

    #32366

    Paul Frishert
    Participant

    I am editing the Invoice report. I have added this to the source part of this report:

    patientper.firstname, patientper.middlename, patientper.lastname, patientper.address1,
    patientper.postcode, patientper.towncity, patientper.knownas,
    patientper.dob, cast(patientper.dob as DATE) as geboorte,

    So my question is about the last line. This line is based on the line “inv.datetime, cast(inv.datetime as date) as _invdate,” from the same report.

    #32367

    Thanks for your post. It’s good to see that you are getting your hands dirty with SQL! 😀

    [1] Click on the Reports and Templates button at the top of ClinicOffice.

    [2] Right-click the Invoice report, and select Design Report.

    [3] A new window will open up allowing you to edit the Invoice, left-click on the label which displays the Invoice Date. This will select the label and you’ll notice a small ‘smart tag’ appear at the top right of the box (it looks like a little arrow symbol “>”). Left click the ‘smart tag’ to bring up a menu.

    [4] Click the button (with 3 dots …) next to the Format String

    [5] Make sure DateTime is selected in the Category section. Click the Standard Types tab. You can then select from a list of options on how you want your date set out, including or excluding time. Once you’ve chosen your preferred option click OK. Then re-click the arrow symbol “< ".Alternatively, you can click the Custom formats tab (rather than the Standard Types) and simply select the “d” option, this stands for default which will use your Windows Regional Settings to display the date in the standard format.

    I hope this helps!

    #32368

    Paul Frishert
    Participant

    Thanks a lot. Now I can even reformat other fields.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.