Lookup of dates

Home Forums SPJS-Lookup Lookup of dates

Viewing 5 reply threads
  • Author
    Posts
    • #8657
      lzuhuo
      Participant

        Hi Alex, How can I set my lookup field in date format? It appears like “2015-10-07 00:00:00”, I’d like to be in “dd/mm/yyyy” format, but in order of dates.

      • #8750
        Alexander Bautz
        Keymaster

          Hi,
          Sorry for the delay – can you give me some more information? – is it a Lookup column, or a vLookup column in DFFS you are referring to?

          Alexander

        • #9403
          lzuhuo
          Participant

            Lookup column

          • #9412
            Alexander Bautz
            Keymaster

              I see. Unfortunately this is the way the value is returned by the query. Your best option would be to add a calculated column with a formula returning your preferred date format – using this new column in your “spjs-lookup” column.

              Alexander

            • #9427
              lzuhuo
              Participant

                Sure, but how can I filter this dates based on value of “today”? For example, dates which has values less than today, I would like to not show them

              • #9442
                Alexander Bautz
                Keymaster

                  Try using a CAML like this in the “filterObj”:

                  <Where>
                  <Geq>
                  <FieldRef Name='EventDate' />
                  <Value Type='DateTime'>
                  <Today />
                  </Value>
                  </Geq>
                  </Where>

                  Change the “EventDate” to match your field.

                  Alexander

              Viewing 5 reply threads
              • You must be logged in to reply to this topic.