database - Wondering what the default post date PHP string for Wordpress is? -


i'm trying add column csv exported using php file.

down bottom in post_date part need know correct string when submission/ wordpress post made. i've got default date request in there that's current time , not post time. how can date post made? appreciate help!

$surveyarray = array(       'id'                  => $survey_id,       'title'               => $survey_title,       'airline'             => $airlinename,       'meal'                => $mealname,       'test_great'          => $get_test_great[0],       'fair_price'          => $get_fair_price[0],       'friendly_host'       => $get_friendly_host[0],       'right_temp'          => $get_right_temp[0],       'looked_good'         => $get_looked_good[0],       'would_reorder'       => $get_would_reorder[0],       'comment'             => $get_comment[0],       'airlane_race_number' => $get_airlane_race_number[0],       'post_date'       => $postdate = date ("y-m-d h:i:s"),   );   $allairlinesandanswersinarray[] = $surveyarray; 

}

please, open wp-related topics @ wordpress.stackexchange.com

p.s. solution is:

'post_date'       => $postdate = get_the_date( "y-m-d h:i:s", $survey_id ) 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -