Find assets published after date?

Chris's Avatar

Chris

29 Jul, 2011 06:53 PM

Is it possible to get a list of assets that were published after a certain date? I don't see where this search term would be set.

  1. 1 Posted by Chris on 29 Jul, 2011 07:36 PM

    Chris's Avatar

    Allow me to clarify in case any Hannon Hill staff are actually monitoring this forum...I would like an efficient way to search for these assets, rather than spidering my entire site and checking against "getLastPublishedDate()"

  2. Support Staff 2 Posted by Tim on 29 Jul, 2011 08:40 PM

    Tim's Avatar

    Hi Chris,

    There isn't anything native in the product that will allow you to do this. It sounds like this would be a nice addition to this feature request, so be sure to vote/comment on that item if you wish.

    In the meantime, I can provide you with some steps that should do the trick:

    • Enter the date in question into an online unix conversion tool and convert it to a timestamp. For example: 7/29/2011
    • Take the timestamp that is returned and add three zeros to the end of it. Continuing the example from above: 1311811200 + 3 zeros = 1311811200000
    • Now take this number and plug it into a SQL query like this:
        select fc.name, fc.id, fc.cachePath, s.name 
        from cxml_foldercontent fc, cxml_site s 
        where fc.isCurrentVersion = 1 
        and fc.isRecycled = 0 
        and fc.lastDatePublished > '{date}' 
        and draftOriginalId is null 
        and fc.siteId = s.id;
      
      So the query for this example will be:
        select fc.name, fc.id, fc.cachePath, s.name 
        from cxml_foldercontent fc, cxml_site s 
        where fc.isCurrentVersion = 1 
        and fc.isRecycled = 0 
        and fc.lastDatePublished > '1311811200000' 
        and draftOriginalId is null 
        and fc.siteId = s.id;
      

      Let me know if this helps.

    Thanks

  3. 3 Posted by Chris on 02 Aug, 2011 02:42 PM

    Chris's Avatar

    This is handy, thanks!

  4. Chris closed this discussion on 02 Aug, 2011 02:42 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac