Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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')

See Also

Functions

Introduced in R2011a

Was this topic helpful?