Time Datatype

Ross Culver

New Member
Forgive me in advance if this is a frequently asked question, but . . .

I want to create a field that stores the current time (time stamp) that a particular record is created or changed.

What is the correct datatype (int?) and what is the code to set the value to the current time?

Thanks in advance.
 

jamesmc

Member
Hi Ross,

The datatype you want will be integer with a format of no more than 99999 as the maximum value time will be is 86399.

To assign a value to the field you can use 'assign db_field = time' and to display you can use 'display string(db_field, "HH:MM:SS")' or whatever format you want to use.

HTH,

James.
 

Ross Culver

New Member
Thanks

Thanks, James.

I had hoped to be able to use the UET fields to setup a timestamp field for several tables, but since they can't accept a function as a default setting, it looks as though I'm going to have to actually add the fields to Syteline (Progress) proper.

Thanks for your help.

Ross
 
Top