Hello, this a problem I did not realize until recently as it's the end of the year.
I use the format mm.dd.yyyy for the Datepicker in one of my forms, but when I order by dates, it's putting 2013 dates above the 2012 ones. This makes our schedules really confusing to read.
Is there any way to fix this?
I use the format mm.dd.yyyy for the Datepicker in one of my forms, but when I order by dates, it's putting 2013 dates above the 2012 ones. This makes our schedules really confusing to read.
Is there any way to fix this?
Hi MaryLynn,
The date format mm.dd.yyyy is practically useless for sorting :-( You need to use yyyy.mm.dd to get any sensible result.
Ideally you'd save the dates in a useful format and just re-format them to display. Practically this may not be possible in which case you probably have to and a hand-coded sort to the list with code that uses re-formatted dates.
Where exactly so you see the problem? How is the list produced and sorted now?
Bob
The date format mm.dd.yyyy is practically useless for sorting :-( You need to use yyyy.mm.dd to get any sensible result.
Ideally you'd save the dates in a useful format and just re-format them to display. Practically this may not be possible in which case you probably have to and a hand-coded sort to the list with code that uses re-formatted dates.
Where exactly so you see the problem? How is the list produced and sorted now?
Bob
The list is generated by the DB Multi Record Loader, which loads user schedules from a database generated by a form that has the Datepicker.
The WHERE statement is
This portion is to get the user's schedule on their Community Builder profile.
The WHERE statement is
<?php
global $_CB_framework;
$bcuser = $_CB_framework->displayedUser();
echo "`cf_user_id` = $bcuser";
?> ORDER BY Date_BeginsThis portion is to get the user's schedule on their Community Builder profile.
Hi MaryLynn,
You can try ORDER BY UNIX_TIMESTAMP(`Date_Begins`) and see if that will convert the date for you.
Bob
You can try ORDER BY UNIX_TIMESTAMP(`Date_Begins`) and see if that will convert the date for you.
Bob
This topic is locked and no more replies can be posted.
