Discussions

Expand all | Collapse all

Sorting by date with empty dates

  • 1.  Sorting by date with empty dates

    Posted 18 days ago

    The current sort for my report is by date, newest to oldest, and grouped by day.

    The default seems to be that if the date field is empty, this record shows at the very bottom of the report. 

    Is there a way to get the records with empty dates to show at the top of the report instead?



    ------------------------------
    Ashley Gwozdz
    ------------------------------


  • 2.  RE: Sorting by date with empty dates

    Posted 18 days ago
    no problem,
    The field that you display on the report does not need to be the same field that you sort on. So just create a new formula date field called [Date Sort] with a formula of

    IF(IsNull([My Date Field]), Date(2099,01,01), [My Date Field])

    That will sort blanks as the most most current. 


    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Sorting by date with empty dates

    Posted 18 days ago
    Thanks so much Mark! 

    I am getting an error on this code. Is there something missing? 

    "Expecting text but found date"



    ------------------------------
    Ashley Gwozdz
    ------------------------------



  • 4.  RE: Sorting by date with empty dates

    Posted 18 days ago
    This would be a date so change the field type to be formula date.

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 5.  RE: Sorting by date with empty dates

    Posted 18 days ago
    Oh, I've got it working now. Thanks Mark!!

    ------------------------------
    Ashley Gwozdz
    ------------------------------