There must be an easier way

craigisaacs

Member
Licensed User
Attached is my first real program. I am a newbie and need a little help. I have 2 date fields in my simple database. I am using the calendar function. for me to display the date in a format I can understand I am converting the date to show on the table and convert it back to let it work for the calendar function. Now I want to sort the table by the date and it will not sort because I have converted it. There must be an easier way. Any suggestions?
 

Attachments

  • Sales.sbp
    4.5 KB · Views: 177

specci48

Well-Known Member
Licensed User
Longtime User
Hello craigisaacs,

one quick solution might be to store another column in the table with the ticks value of the date (or for each date). Set the column width to 0 so it is not visible on the form but you can easiliy sort the table with this column.

Since you have defined your table columns "manually" you should use the LoadCsv method without automatic columns creation:
B4X:
SalesTbl.LoadCSV ("Sales.csv", ",", True, False)
or your individual column widths are overwritten.


specci48
 

Attachments

  • Sales_with_Sort.sbp
    4.7 KB · Views: 141
Top