Forums

Find answers, ask questions, and connect with our
community all around the world.

Home Forum Omnis General Forum How to return date/datetime fields as ISO8601

Tagged: 

  • How to return date/datetime fields as ISO8601

    Posted by Dario L. on February 14, 2020 at 3:14 pm

    Hi,
    I’m currently working with Omins restful services and I noticed that if the method return type comes from an Omnis list/row, eventual date fields are not being automatically converted into ISO8601. Is there a way to achieve this behavior?
    This also happens with OJSON functions (e.g. $listorrowtojson(), etc)
    Thank you

    Russelllouis replied 2 years, 4 months ago 4 Members · 4 Replies
  • 4 Replies
  • Klaus Schrödl

    Administrator
    February 17, 2020 at 10:52 am

    Hi Dario,
    in Omnis 8 and higher, there are two methods
    iso8601toOmnins()
    omnistoiso8601()
    which should do the job.

    • Dario L.

      Member
      February 17, 2020 at 10:59 am

      Thank you for the answer.
      So this means the only feasible way to convert said fields is by looping through each field, figure out if its type is date, then call that function for each record on that field(s)?
      I was hoping for a more integrated solution, but if there’s nothing else available I guess I’ll have to cope with the “manual” conversion overhead.

  • Dogan

    Member
    October 22, 2021 at 11:17 am

    thanks for the methods. Enlego

  • Russelllouis

    Member
    November 5, 2021 at 11:53 am

    In Excel, the formula below will help you convert a date/time format cell to a date alone cell. 1. Select a blank cell for the date value, then type =MONTH(A2) & “/” & DAY(A2) & “/” & YEAR(A2) into the formula bar and hit Enter. If you interesting to check out the websites https://www.zerodefectmanufacturing.com/ujigami-mes/.

Log in to reply.