How to sort posts by date?

Now the records are displayed alphabetically, tell me how I can make a conclusion based on the creation date of the post?
The code itself:
<?php
 $temp = $wp_query; $wp_query= null;
 $wp_query = new WP_Query(); $wp_query--->query('showposts=24&order=asc&orderby=title' . '&paged='.$paged,);
 while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
July 9th 19 at 11:01
1 answer
July 9th 19 at 11:03
Solution
By date (from old to new:)
<?php
 $temp = $wp_query; $wp_query= null;
 $wp_query = new WP_Query(); $wp_query--->query('showposts=24&order=asc' . '&paged='.$paged,);
 while ($wp_query->have_posts()) : $wp_query->the_post(); ?>


By date (new to old)
<?php
 $temp = $wp_query; $wp_query= null;
 $wp_query = new WP_Query(); $wp_query--->query('showposts=24' . '&paged='.$paged,);
 while ($wp_query->have_posts()) : $wp_query->the_post(); ?>

Find more questions by tags WordPress