opc.setDateDisplayFormat
Set format for date display of OPC objects
Syntax
opc.setDateDisplayFormat(DateFmt)
opc.setDateDisplayFormat('default')
NewFmt = opc.setDateDisplayFormat(...)
Description
opc.setDateDisplayFormat(DateFmt)
sets the date display
format for OPC HDA data objects to DateFmt
.
DateFmt
can be any date format number, character vector, or
string as defined by datestr
. The date display format
persists across MATLAB® sessions.
opc.setDateDisplayFormat('default')
resets the date display
format to the character vector 'yyyy-mm-dd HH:MM:SS.FFF'
.
NewFmt = opc.setDateDisplayFormat(...)
sets the date display
format and returns the new date display format in NewFmt
.
Examples
Load the OPC HDA example data set and show the values of one of the loaded variables.
load opcSampleHdaData;
hdaDataSmall(1).showValues
Set the date display format to show time only, and display the values again.
opc.setDateDisplayFormat('HH:MM:SS');
hdaDataSmall(1).showValues
Reset the display format to the default.
dFmt = opc.setDateDisplayFormat('default')
Version History
Introduced in R2011a