Last Report Date

(imported topic written by RosaMartin)

we need to convert the Last Report date from " Wed, 17 Feb 2010 02:45:47" which we get from the view “BES_COLUMN_HEADINGS” to “2010-02-17 02:46:04.703”. Do you know how we can do this.

“2010-02-17 02:46:04.703” is how it is displayed in the “COMPUTERS” table.

Thanks, Rosa.

(imported comment written by BenKus)

We use mime type time fields and SQL doesn’t like the day and the timezone… you can chop them off and convert them:

select convert (datetime, (substring (value, 6,20))) from BES_COLUMN_HEADINGS where name = ‘Last Report Time’ and len (value) > 20

(the last part is to avoid errors).

If you are running BigFix 7.x+, I would suggest that you use the SOAP API because manipulating/converting the data like this is much much easier in relevance than in SQL.

Ben