Showing saved date in label?

Is there a way to show the saved date in a label?

You mean the date the record was last saved ?

If you have a created a column in the underlying table to save the date when a record is saved, then yes it’s possible. Add this column in your query, if needed convert the date to string and set the label to display the string.

What did you save?

In case it is a database, you want to have a column with a date type in your record.
You can automatically update this date with a Trigger. the Trigger syntax differs for each type of database.

In case it is a file or folder, you can use the ModificationDate property.

In case you saved money in your savings account, you simply log in to your bank account to see how much you saved :wink:

Yes, I would like to be able to see when I saved a project file while running the app. I have so many version of my project that I sometimes mix them up. So I want to place a label at the bottom of the main window that shows the last saved date.

I am saving information to an SQlite database.
I don’t dare to look at my savings account, I know the amount by heart and it doesn’t look good… :slight_smile:

You mean the last time you saved the project in the IDE? Or the last time you saved something while running the app?

Your app could look for the myapp.xojo_project file and read its modification date and put that in the the label’s text property.

That’s assuming your project is in text format. Otherwise, look for the file that gets changed everytime you save, and read its modification date.

The last time I saved the project in the IDE, so the same data I see in the finder.

You asked how to show “the saved date”. Unfortunately an ambigous question. My answer was about data (record) saved date.

Why do you need to show the last compiled date ? You may display the version of your application, this is something you set inside the IDE.

No, not the last compiled dated, but the last time I save the Xojo file, but maybe I am trying to do something that is just as easy to see in the Finder.

How about use this information?
image

Is not clear how you know the difference between versions just by knowing the saved date.

My approach was for the last saved date. For the last compiled date, you’d need to look at the creation date of myapp.app.

Maybe this is a good time to use a version control system like Git. If you have a NAS (like a Synology), you can host your own Git Server local.

2 Likes

Even Private Repos are free (now) on GitHub.
A no-brainer… :slight_smile: