Security

last person joined: yesterday 

Forum to discuss Enterprise security using HPE Aruba Networking NAC solutions (ClearPass), Introspect, VIA, 360 Security Exchange, Extensions, and Policy Enforcement Firewall (PEF).
Expand all | Collapse all

Reporting Date Conversions?

This thread has been viewed 0 times
  • 1.  Reporting Date Conversions?

    Posted Jun 18, 2012 12:53 PM
    I'm trying to run a report based on the List of clearpass guest user accounts. The report would just list the Username, creation date, and the account expiry time. I know I can do this with an export of the accounts, but, We have a small staff and I want a daily report that can be emailed to a few staff members automatically. I can get the report generated but my issue is the dates are not formatted properly. It looks like they are formatted in epoch time and I'd like them formatted in a more standard format. So for instance I'm currently getting time listed as: 1340112687 And I need it to be: "Tue Jun 19 2012 08:31:27" I've been playing with the filtering and field values but I can't seem to get the right conversion expression. Has anyone else done this successfully on the reports that can lend a hand? Thanks in advance.


  • 2.  RE: Reporting Date Conversions?
    Best Answer

    Posted Jun 20, 2012 01:17 AM

    Do you have a screenshot of the report output series?

     

    The PHP date() function can be used, to get your format of "Tue Jun 19 2012 08:31:27" you should be able to use something like:

     

    date("D M j Y H:i:s", $_)




  • 3.  RE: Reporting Date Conversions?

    Posted Jun 20, 2012 08:09 AM
    That did it. Guess I need to go back and review PHP some more. Thank You!


  • 4.  RE: Reporting Date Conversions?

    EMPLOYEE
    Posted Jun 29, 2012 02:04 PM

    in the chance the account does not have an expiration, you would want something that looks like:

     

    $_ ? date("D M j Y H:i:s", $_) : 'N/A'

     

     

    http://us3.php.net/manual/en/function.date.php

     



  • 5.  RE: Reporting Date Conversions?

    EMPLOYEE
    Posted Jul 13, 2012 12:34 PM

    FWIW, if you want to customize the accounting table session start and stop times, you need a different expression value in the output series section.  The returned value is a timestamp in string form.

     

    Use:

    NwaDateFormat(strtotime($_), '%Y-%m-%d %H:%M')

     Reminder whenever you update an output series fields format, you also need to hit save at the bottom of the main form too.