<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>CAST in executeSQLQuery</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=8174036" />
  <subtitle>CAST in executeSQLQuery</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=8174036</id>
  <updated>2013-05-25T01:45:42Z</updated>
  <dc:date>2013-05-25T01:45:42Z</dc:date>
  <entry>
    <title>RE: CAST in executeSQLQuery</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=8180743" />
    <author>
      <name>Rene Forstner</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=8180743</id>
    <updated>2012-10-31T15:37:56Z</updated>
    <published>2012-10-31T15:37:56Z</published>
    <summary type="html">Hi David,
 
Thank you, thats exactly the query i'm looking for!</summary>
    <dc:creator>Rene Forstner</dc:creator>
    <dc:date>2012-10-31T15:37:56Z</dc:date>
  </entry>
  <entry>
    <title>RE: CAST in executeSQLQuery</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=8179659" />
    <author>
      <name>David Staudt</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=8179659</id>
    <updated>2012-10-31T15:33:30Z</updated>
    <published>2012-10-31T15:33:30Z</published>
    <summary type="html">The UCM database use Informix IDS, reference herer:
 
 
Some research led me to this, which seems to be a step in the right direction:
 
select dbinfo('utc_to_datetime',datetimestamp) as dt from extensionmobilitydynamic
-------------------
2011-09-12 12:51:18.0
2012-04-17 16:42:34.0
2012-07-19 16:12:48.0
2012-02-27 16:20:59.0
 </summary>
    <dc:creator>David Staudt</dc:creator>
    <dc:date>2012-10-31T15:33:30Z</dc:date>
  </entry>
  <entry>
    <title>CAST in executeSQLQuery</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=8174035" />
    <author>
      <name>Rene Forstner</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=8174035</id>
    <updated>2012-10-31T11:49:44Z</updated>
    <published>2012-10-31T11:46:14Z</published>
    <summary type="html">Hi all,
 
We need to get some informations from the extensionmobilitydynamic table requesting via axl executeSQLQuery.
 
Is there a way to cast the unix timestamp from the "DateTimeStamp" column to a "readable" datetime field, during the query?
 
At the moment the query looks like this
select enduser.userid, device.name from extensionmobilitydynamic,
device, enduser where extensionmobilitydynamic.fkdevice = device.pkid and 
extensionmobilitydynamic.fkenduser_lastlogin = enduser.pkid and
extensionmobilitydynamic.fkenduser IS NULL
now i need the lastLoggedOn users for the last week only.
 
I've tried the following queries, but nothing would work:
 
select cast(DateTimeStamp as DateTime)…

&lt;!--[if !supportLists]--&gt;

select …..where datetimestamp &gt;= UNIX_TIMESTAMP(‘2012-10-20’)
select date(DateTimeStamp)…
 
CUCM Version: 8.6.1
 
kind regards
rené

&lt;!--[endif]--&gt;</summary>
    <dc:creator>Rene Forstner</dc:creator>
    <dc:date>2012-10-31T11:46:14Z</dc:date>
  </entry>
</feed>

