Using time/date tags in SQL WHERE caluse

in scripting I use the following to set date strings to valid date formats

from java.text import SimpleDateFormat

inputFormat=SimpleDateFormat("yyyy-MM-dd HH:mm:ss")  # Must match the format of the input string
outputFormat=SimpleDateFormat("yyyy-MM-dd HH:mm:ss")        # The format you want to convert to

dateIn=event.source.selectedStringValue

processedDateIn=SimpleDateFormat.parse(inputFormat,dateIn)  # Convert Input String to Java Date

event.source.parent.getComponent('Power Table').SDate=processedDateIn
event.source.parent.getComponent('Power Table').EDate=system.date.addMinutes(processedDateIn,7)