Handling "bef", "aft" dates
Quote from Mark Whidby on 2024-12-11, 11:44 amHow are dates stored in RM when they're entered in the UI as "bef. 1870", "abt. 1920", etc.? How does Sort Date work in these situations?
What do I need to be aware of if I want to add/update such a date to an event?
How are dates stored in RM when they're entered in the UI as "bef. 1870", "abt. 1920", etc.? How does Sort Date work in these situations?
What do I need to be aware of if I want to add/update such a date to an event?
Quote from Mark Whidby on 2024-12-11, 11:51 amI did some scrolling through EventTable and it looks the following heuristic is used:
- Exact date: "D.+blah"
- Before date: "DB+blah"
- After date: "DA+blah"
I don't know if I have any "Abt" dates, so not sure how they're stored. Maybe "DC.+" for "Circa"?
And are dates like "T1825 May 22" ones that were entered with an incorrect date format?
I did some scrolling through EventTable and it looks the following heuristic is used:
- Exact date: "D.+blah"
- Before date: "DB+blah"
- After date: "DA+blah"
I don't know if I have any "Abt" dates, so not sure how they're stored. Maybe "DC.+" for "Circa"?
And are dates like "T1825 May 22" ones that were entered with an incorrect date format?
Quote from Tom Holden on 2024-12-11, 11:59 amIf you explore the RM10 Data Dictionary (upper right on the menu bar), you would find this sheet with all that the contributing explorers have found regarding event dates.
If you explore the RM10 Data Dictionary (upper right on the menu bar), you would find this sheet with all that the contributing explorers have found regarding event dates.
Quote from thejerrybryan on 2024-12-11, 11:59 amLet's take the hard one first. Sort dates are stored as a large number. The algorithm may be found at Dates – SortDate Algorithm
Dates are a string. You mostly have figured it out already. If the first letter in the string is a T, that means it's a so-called "text date", which really means it's a date in an invalid format. A complete description may be found at RM Date Formats
Let's take the hard one first. Sort dates are stored as a large number. The algorithm may be found at Dates – SortDate Algorithm
Dates are a string. You mostly have figured it out already. If the first letter in the string is a T, that means it's a so-called "text date", which really means it's a date in an invalid format. A complete description may be found at RM Date Formats
Quote from Mark Whidby on 2024-12-11, 8:08 pm@ve3meo Thanks for the sheet; very helpful!
@thejerrybryan Thank you for the script link; I'll get to readin'!
@ve3meo Thanks for the sheet; very helpful!
@thejerrybryan Thank you for the script link; I'll get to readin'!
Quote from Mark Whidby on 2024-12-20, 6:30 pmThanks again for the links. I used the Sort Date algo to create EncodeSortDate() and DecodeSortDate() functions in SQLiteStudio. This will make working with the dates much easier.
Thanks again for the links. I used the Sort Date algo to create EncodeSortDate() and DecodeSortDate() functions in SQLiteStudio. This will make working with the dates much easier.