Forum

Please or Register to create posts and topics.

Handling "bef", "aft" dates

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?

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?

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.

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

Tom Holden has reacted to this post.
Tom Holden

@ve3meo Thanks for the sheet; very helpful!

@thejerrybryan Thank you for the script link; I'll get to readin'!

 

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.