Removing time from showing in a referenced date field in a calculation.

Comments

5 comments

  • Kent Watson

    Hi Charl,

    You could use the following.  I'm not sure if there is a better way to do it but this will work

    If you are referencing from the same app

    var d = @Date
    d.getDate() + "/" + d.getMonth() + "/" + d.getFullYear()

    if you are referencing from a related app

    var d = @All of Date[0]
    d.getDate() + "/" + d.getMonth() + "/" + d.getFullYear()
    0
    Comment actions Permalink
  • Rainer Grabowski

    Hi Charl,

    I assume you display the date in the calculation field like a "real" date field. So the calculation is date type (calc. fields can be date, number or text type). In the template creator every field has a little triangle on the left side, this is for field settings. Click it and deselect "Show time". It will still be shown in the calc. preview, but not in the item view.

    Rainer

    0
    Comment actions Permalink
  • Charl Henning

    Thanks for that. It works. However, some of the items in the app now show nothing in the calculation field...

    0
    Comment actions Permalink
  • Rainer Grabowski

    How do you pull the date into the calculation field?
    With @all of date or @max of date (or @min of date)?
    Are more than 1 items related?
    What does the calculation preview show in those items where now nothing is shown?
    Can you share a screenshot of your calculation field?

    Rainer

    0
    Comment actions Permalink
  • Charl Henning

    Hi Rainer. I will test and get back to you thanks.

     

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk