Skip to content

Instantly share code, notes, and snippets.

Created February 3, 2015 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/f87f827d02adfcb1d973 to your computer and use it in GitHub Desktop.
Save anonymous/f87f827d02adfcb1d973 to your computer and use it in GitHub Desktop.
SELECT entry_id, DATEDIFF(from_unixtime(field_id_162, '%Y-%m-%d'), from_unixtime(field_id_267, '%Y-%m-%d')) as days, CONVERT_TZ(from_unixtime(field_id_267, '%m/%d/%Y %h:%i %A'), 'GMT', 'CST') as start, from_unixtime(field_id_162, '%m/%d/%Y %h:%i %A') as end FROM exp_channel_data Where field_id_162 != '' AND field_id_729 != '' AND field_id_267 BETWEEN UNIX_TIMESTAMP('2015-01-01') AND UNIX_TIMESTAMP('2015-02-12')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment