Mysql queries filtered by date

Any and all non-support discussions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Mysql queries filtered by date

Postby rudio » Mon Mar 19, 2012 1:21 am

Hi all,

New to Vicidial and want to do some custom reporting.

Use to Asterisk but cant seem to get the reports filtered by date as I want to.

I would like to report from the call_log tables only from the 1 March 2012 to 7 March 2012 for instance. Per todays date and from to current date etc.

mysql -D asterisk -e "select * from call_log where date(calldate) > '2012-03-01' order by calldate;
Tried changing date(calldate) to column headers inside tables and filter like that, but its just dumping the whole tables from beginning to end.

Not sure if this belongs on General or support

Any help would be appresiated.

Rudi
rudio
 
Posts: 3
Joined: Mon Mar 19, 2012 1:10 am

Postby DomeDan » Mon Mar 19, 2012 3:41 am

Hi.

calldate does not exist in call_log or maybe you got a version of vicidial where that column exist?
please tell us your version and other stuff like this:
Vicibox Redux 3.1.9 i686 (svn) | Admin: 2.4-354a 120104-2024 | Agent: 2.4-340c 111227-1940 | astGUIclient 2.4b0.5

in 2.4b0.5 you can just replace calldate to get the data you want:
select * from call_log where date(start_time) > '2012-03-01' order by start_time;
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden

Postby rudio » Mon Mar 19, 2012 3:52 am

ThanX

select * from call_log where date(start_time) > '2012-03-01' order by start_time;

Will probably work. I added start_time, without the date().


Regards,

Rudi
rudio
 
Posts: 3
Joined: Mon Mar 19, 2012 1:10 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 92 guests