How do I set up a Time Stamp field?


#21

Thanks for that explanation—it helps to unpack what the formula was doing.

OK, I guess what I’m trying to understand is how and where these formulas are applied. I tried to set up a new procedure for the text replacement, starting from the datasheet window and applied using the Run button in the Procedure window, or from the Action menu; but I couldn’t get it to work. The data in the “Date Created” field didn’t change.

I then tried to do the same thing in Graphics Mode on the form, putting “«Date Created» = replace(«Date Created»,“T”,”, “)” on the Procedure tab for that field: and that works, but only if I click in the field back in Data Mode! Otherwise I can edit other fields, move to a different record and back, but “Date Created” still displays the old format “2013-10-18T21:11:57". (The same applies on the Datasheet: it’s only when I click on a specific “Date Created” field that it changes format; and after that it stays changed. But all the other fields retain their old format with the “T” in the middle.)

So how do I do a general replacement that will fix all the “Date Created” fields?


#22

Use the Field>Morph>Fill with Formula dialog.

You can also use the Field>Morph>Morph Field dialog, and choose Start with Formula from the popup menu, but I think the Fill with Formula dialog is more straightforward in this case where you are only using a formula, not combining it with other options. But this is a powerful dialog that you should study.

Again, keep in mind that even though these dialogs can quickly transform thousands of cells, you can just as quickly undo if it didn’t work out the way you expected. So feel free to experiment.

If you want to do this in programming code, you would use the formulafill statement.


#23

Thanks, Jim, I looked at your first Help link and applied it—it did the replacement in a very easy and intuitive way. I’ll have a look at formulafill as well.

I’ve got a lot of catching up to do with the videos and Help pages; but this is getting me off to a good start. Much appreciated!