0

I'm exporting freeform entries with AJW export, and have no idea how to format the entry_date field when exported as .csv

AJW export documentation doesn't appear to exist, besides a sample EE tag you can use. Has anyone else formatted entry_date when exporting entries as a .csv?

Here is my code (changed filename):

{exp:ajw_export 
    sql="SELECT entry_date, form_field_1, form_field_2, form_field_3, form_field_4 FROM exp_freeform_form_entries_1" 
    format="csv" 
    delimiter=","
    filename="filename.csv"
}
2

try DATE_FORMAT(from_unixtime(entry_date), '%Y-%m-%d') AS post_date

0
0

Wow! This little gem just saved my bloody head. All my date comparisons were failing due to the UNIXTIME. I was trying to use DATE_FORMAT() and it just kept giving me errors, but this solved that. THANK YOU!! Like 3+ years later.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.