Timestamp Property
General info
Label |
Timestamp |
Description |
The timestamp of the start time of the oldest BatchID. |
Data type |
DateTime |
Type |
Regular |
Code |
3059 |
Symbolic name |
MODEL_PROP_TIMESTAMP |
Lua access code |
syslib.model.properties.Timestamp |
Available since |
1.38 |
- Parent properties
Attributes
| Name | Tooltip |
|---|---|
| PROP_VISIBLE | The property is visible in DataStudio and can be read by the inmation APIs. |
| PROP_VOLATILE | The property exists during runtime of the service only and is not saved to the image. |
Examples
Read from or write to the Timestamp property.
-- Read from the Timestamp
syslib.getvalue("<OBJECT FULL PATH>.HistorySettings.Timestamp")
-- Write to the Timestamp
syslib.setvalue("<OBJECT FULL PATH>.HistorySettings.Timestamp", syslib.currenttime())
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "<username>", Password = "<password>" };
StatelessInterface sli = new StatelessInterface(tcpcfg);
// Read from the Timestamp
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.HistorySettings.Timestamp"));
// Write to the Timestamp
Result result = sli.WriteValue(sc, new WriteItem(DateTime.Now, "<OBJECT FULL PATH>.HistorySettings.Timestamp"));