Hi there,

i've tried to create a smart label that lists all installed computer (laptops / desktops) since the 25th of october. Here is the code, i get no results, but computers are installed since this date. What did I wong?

select *, UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_TIME,
                       UNIX_TIMESTAMP(MACHINE.LAST_SYNC) as LAST_SYNC_SECONDS
                  from ORG1.MACHINE
                  LEFT JOIN KBSYS.KUID_ORGANIZATION ON KUID_ORGANIZATION.KUID=MACHINE.KUID LEFT JOIN KBSYS.SMMP_CONNECTION ON SMMP_CONNECTION.KUID = MACHINE.KUID AND KUID_ORGANIZATION.ORGANIZATION_ID = 1
                 where (((  CHASSIS_TYPE like '%laptop%') AND OS_INSTALLED_DATE > '24.09.2012'))

Thanks,
Peter

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

1

Try changing your date format to this:

OS_INSTALLED_DATE > '2012-09-24'

You can verify this format by running this query in the MySQL Query Browser:

SELECT M.OS_INSTALLED_DATE FROM MACHINE M

And with your criteria:

SELECT M.OS_INSTALLED_DATE FROM MACHINE M
WHERE M.OS_INSTALLED_DATE > '2012-09-24'

John

Answered 09/28/2012 by: jverbosk
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity