convert time and date formats?

I’m glad you worked it out, but why you jumped through these hoops instead of just storing the Date object or SQLDateTime in a CellTag when populating your ListBox, as Norman suggested, escapes me.

Kem
Although I have been a member on here for a few years - I only actually use Xojo once or twice a year.
Therefore, I am a perpetual Newbie when it comes to programming.

I didn’t really understand his suggestion, and it would be an almost impossible task for me to re-code a large segment of my software.
Every minor problem I encounter takes me DAYS to resolve, so totally changing something I have finally got to work would not really be practical.

I have however, learnt so much from the members on here, which take the time to help me solve the problems I encounter - and for that I am eternally grateful.

Understood.

For the future, the ListBox.CellTag property works like an invisible Cell for each row. It’s a Variant that you can store with the row, and what gets stored and even which column it gets stored in is up to you. Since it’s totally invisible to the user, you can use it to store additional information that you can use later for any purpose you deem necessary. In your case, if the original date came out of a database, when you populated the ListBox, you might have done something like this:

lb.Cell( row, 1 ) = dateString
lb.Cell( row, 2 ) = timeString
lb.CellTag( row, 1 ) = theDate // Original Date object that generated dateString and timeString

Later, when comparing dates, rather than parsing dateString and timeString, you could extract theDate from CellTag( row, 1 ) and use it for comparison.

Thanks for explaining that, Kem.

I am currently having trouble with row tags at the moment. I posted a question in the Getting Started forum, regarding preventing multiple MsgBoxs from appearing.

I was advised to set a row tag once a MsgBox has been displayed and then check that to prevent it from re-displaying.
I have just realised however, that if a new row is added to the listBox, the row tag becomes invalid and my MsgBox re-appears :frowning:

After spening 2 days whole days and nights trying to get simple “reminder” functionality to work, I must now admit defeat and give up on the idea.

I somehow managed to create the ADD REMINDER window. Then managed to make the reminders editable. Then managed to store the reminders to a database and read them back in. I even managed to compare the time and date the user set and, compare them with the current time and date.

BUT, I cannot for the life of me, manage to prevent multiple instances of the due MsgBox from re-appearing :frowning:
Arghhhhhhhhhhhhhhhh. lol

Post a link to that other conversation. Hopefully you posted code.

Note that you mentioned RowTag but I specified CellTag. They are similar, but not the same in that you can only have one RowTag per row, but many CellTags per row.

https://forum.xojo.com/9787-prevent-multiple-msgboxs

Grrrrrrrrrrr the link I posted above doesn’t work???

As you can probably work out - the post is called “Prevent Multiple MsgBoxs”, and it is in the Getting Started Forum.