Forum Discussion

msap's avatar
msap
Frequent Contributor
6 years ago

how to get date value equal to today's date without timestamp from the Date column in a grid.

I was using below script findrow method to capture the date .any suggestions.

var dt = aqDateTime.Today();
var FormatStr = aqConvert.DateTimeToFormatStr(dt, "%#m/%#d/%Y")
Log.Message("Value of dt or Formated String --> " + FormatStr)
RowIndex = Grid.FindRow("Created Date",FormatStr);
for(i=0;i<= attributeMaintenanceGrid.wRowCount-1;i++)
attributeMaintenanceGrid.wValue(i, "Created Date");
Log.Message("Value of dt string --> " + "Created Date")

 

getting : value todays date is not found since date column considers timestamp too

and value doesnot return created date value. 

 

9 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    So... your column includes the timestamp?

     

    What you're going to have to do is, instead of using the native FindRow, write your own for-loop to go through the rows on your grid and use an aqString.Find method on the current row to determine if the column contains the date.