Date Popup Date property

I am trying to dynamically change the date selected when i activate the internal frame. The queries dont give me any errors, but the date isnt changing. I think its due to format errors, but i am not sure. here is my code

[quote]start_date = fpmi.gui.getParentWindow(event).getComponentForPath(‘Root Container.Start Date’).date
end_date = fpmi.gui.getParentWindow(event).getComponentForPath(‘Root Container.End Date’).date

start_date = fpmi.db.runScalarQuery(“select now() from hmi_data”)
end_date = fpmi.db.runScalarQuery(“select date_sub(now(),interval 1 day) from hmi_data”)

I’m confused:

  1. That script doesn’t do anything - it just assigns values to scripting variables in memory. I think I see what you’re tring to do, but rather than troubleshoot the script…

  2. Is there a reason you’re using a script? This definitely seems like a textbook situation for a property binding (a polling-off SQL query binding)

Hope this helps,

yes, i just removed the scripting variables and directly assign the query to the object. That worked, but the binding with polling-off, i just didnt think to do it that way, works as well and is simpler to understand