How to make an app - Andromo App Maker

Announcement

Collapse
No announcement yet.

SQLite3 Actions Plugin Date Command

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • SQLite3 Actions Plugin Date Command

    Hi,
    I'd like to retrieve information from the sqlite db using a SQLite 3 Actions Plugin like "SELECT date('now','start of month','+1 month','-1 day')", Is it possible?
    I'd like to use the date functions direct from SQLite.

    Thanks,

    Rene Baccarelli de Almeida

  • #2
    Hi Rene, It certainly is possible
    I have been researching this for a few weeks now for a project to check if a date is a month prior to end date.
    the date maths were done in AMS and inserted into DB as fields and then recalled EG:

    Code:
    function CheckMail()
    local q = "SELECT UserID,Name,Email FROM UserData WHERE ID1_date or ID2_date or ID3_date or ID4_date or ID5_date or ID6_date = '"..tDate.."'"
            
            for row in db:nrows(q) do
            
            ListBox.AddItem("ListBox1", row.UserID, "")
            ListBox.AddItem("ListBox2", row.Name, row.Email)
            --Dialog.Message("Notice", row.UserID.."\r\n"..row.Name.."\r\n"..row.Email, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
            
            end
    If you could be more detailed in your needs or attach sample I may have the snippets of code to help
    Cheers

    Comment

    Working...
    X