Frequent Contributor I

Reporting Date Conversions?

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.

Re: Reporting Date Conversions?

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", $_)

Frequent Contributor I

Re: Reporting Date Conversions?

That did it. Guess I need to go back and review PHP some more. Thank You!
Aruba Employee

Re: Reporting Date Conversions?

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'


Aruba Employee

Re: Reporting Date Conversions?

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.



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.


Search Airheads
Showing results for 
Search instead for 
Did you mean: