StringTheory UnixDate Display in Browses (Format stored data to display in Browse)


Can anybody please show me an example of the usage of the StringTheory Formatting when you want to display date and times from a real field in SQL? or please point me to the Clarion live episode this was used or explained in please?

Check out the string theory formatting example. That gives you way to play with different pictures.

Basically, declare a StringFormat object and call it with the desired picture. The docs talk about the unix format pictures.

FmtUnix StringFormat
 FormatedDateTime =  fmtUnix.FormatValue(MyUnixTime,'@U_D4T4')

This will give you something like 2023/05/22 15:09:32.

1 Like


Thank you I thought there was an easier way to achieve this.

I created a String and then on the SetQueueRecord I did the fmt. command. The problem is now that these fields are not sortable. Any why to get that to work?

What method are you using for sorting? The extended browse options column sorting?

If so the uyst set the volumn sorting options so that the underlying Real is used as the sort field for that column.

If you don’t find the setting, come to the User Group webinar tomorrow and I can show you.

Yes, the ABC Browse Extension Column Header sort.

Ok but need to have it displayed as a date.

I will try my best to make it, or else maybe just discuss it I will catch up or watch offline when back, please?

Solution was explained in detail by Bruce in the Weekly Webinar for 24/05/2023 - Thank you @Bruce