Reply To: bysort prefix with date format in asdoc messes up the date order Attaullah Shah 4 years ago Assalam-O-Alaikum Thanks for your email and kind words. Can you please send a sample of your data to reproduce the error.