smatdb question Cloverleaf 19.1 convert integer timestamp to human readable form

Clovertech Forums Cloverleaf smatdb question Cloverleaf 19.1 convert integer timestamp to human readable form

  • Creator
    Topic
  • #118510
    William Grow
    Participant

      None of the built in utilities seem to produce a human readable output for a date value. I am trying to do a select statement in a date range to get a count of messages. Any suggestions, please note not an expert on sqllite.

       

      SELECT
      datetime (TimeArc,’unixepoch’),
      date (TimeArc,’unixepoch’),
      time (TimeArc,’unixepoch’)
      FROM smat_msgs;

    Viewing 0 reply threads
    • Author
      Replies
      • #118511
        Charlie Bursell
        Participant

          How about something like:

          select datetime((select time from smat_msgs)/1000, ‘unixepoch’, ‘localtime’) as dates

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