11-18-2022, 02:17 PM
I'd go with bplus's type approach with using a user type to store my data, but I'd arrange my data a little differently.
Type Blood
Year as Integer
Month as Integer
Day as Integer
Hour as Integer
Minute as Integer
Level as Integer
Comment as string * 255 ' <<< you have to decide a maximum number or characters if you hope to file it using RA*
End Type
Why would I be so much more complex?
For when I needed to reference that data. The way our data is written out here, we can now do a quick search for what our levels were on certain days/times.
2022-10-11-23-11... This data would be for October 11th, 2022, at 11:11PM... This format is easy as heck to sort your data and make it sequential, if that's ever needed.
Most dates are day, month, year, in string format... If you ever sort your data, it'll make things a mess to work with! You'll get stuff like:
"01-01-2000"
"01-01-2001"
"01-01-2002"
That'll be a PITA to deal with over time. Now sure, you could parse that string, strip out the year, month, day, and then sort it so it'd be in a reasonable order... OR... You could just be certain to structure your data to keep those parts separate and unique to begin with, and save yourself that hassle.
Type Blood
Year as Integer
Month as Integer
Day as Integer
Hour as Integer
Minute as Integer
Level as Integer
Comment as string * 255 ' <<< you have to decide a maximum number or characters if you hope to file it using RA*
End Type
Why would I be so much more complex?
For when I needed to reference that data. The way our data is written out here, we can now do a quick search for what our levels were on certain days/times.
2022-10-11-23-11... This data would be for October 11th, 2022, at 11:11PM... This format is easy as heck to sort your data and make it sequential, if that's ever needed.
Most dates are day, month, year, in string format... If you ever sort your data, it'll make things a mess to work with! You'll get stuff like:
"01-01-2000"
"01-01-2001"
"01-01-2002"
That'll be a PITA to deal with over time. Now sure, you could parse that string, strip out the year, month, day, and then sort it so it'd be in a reasonable order... OR... You could just be certain to structure your data to keep those parts separate and unique to begin with, and save yourself that hassle.