Set column values dataset

I have a script that will set a dataset that is populated by running queries.
starting with query 1:

      day = "some date"
      resultsPy1 = system.db.runQuery(query1)
      resultsData1 = system.dataset.toDataSet(resultsPy1)
      editData = system.dataset.setValue(resultsData1, -1, "Date", day)

But I am trying to change all of the Date column rows to a particular date value.
I noticed there are a few methods of setting values, but would like to find a simple solution to set every row in my column, even perhaps without using a loop.

Any suggestions?

Sorry, you need a loop,overwriting ‘editData’ every time…from java.util import Date day = Date.parse("some date") resultsPy1 = system.db.runQuery(query1) editData = system.dataset.toDataSet(resultsPy1) idx = editData.getColumnIndex("Date") for r in range(editData.rowCount): editData = system.dataset.setValue(editData, r, idx, day)Using the column index instead of the column name will speed it up some for large datasets.

If you are going to replace the date of all the rows being returned, just pass in the date you want.

[code]import datetime

today =

query = “”"
SELECT CAST(? AS DATETIME) AS ‘tstamp’, col1, col2, col3
FROM mytable
result = system.db.runPrepQuery(query,[today])[/code]

[quote=“jpark”]just pass in the date you want.[/quote] /me slaps forehead :prayer: