# SetPreferences()

Sets preferences for returned time stamped data, analog temperature data, and CJC temperature data.

Member of the DataLogger class.

## Function Prototype

VB .NET

Public Shared Function SetPreferences(ByVal timeFormat As MccDaq.TimeFormat, ByVal timeZone As MccDaq.TimeZone, ByVal units As MccDaq.TempScale) As MccDaq.ErrorInfo

C# .NET

public MccDaq.ErrorInfo SetPreferences(MccDaq.TimeFormat timeFormat, ref MccDaq.TimeZone timeZone, ref MccDaq.TempScale units)

## Parameter

timeFormat

Specifies the time format to apply when returning time stamp data (when using ReadTimeTags() for example).

All of the timeFormat settings are MccDaq.TimeFormat enumerated constants. Choices are MccDaq.TimeFormat.TwelveHour (for example 2:32:51) and MccDaq.TimeFormat.TwentyFourHour (for example 14:32:51).

timeFormat defaults to MccDaq.TimeFormat.TwelveHour.

timeZone

Specifies whether to convert time stamped data that is returned (when using ReadTimeTags() for example) to the local time zone or to return the time stamps as they are stored in the file (in the GMT time zone).

All of the timeZone settings are MccDaq.TimeZone enumerated constants. Choices are MccDaq.TimeZone.Local and MccDaq.TimeZone.GMT.

timeZone defaults to MccDaq.TimeZone.Local.

units

Specifies the unit for analog data. This value is ignored if counts are logged.

All of the units settings are MccDaq.TempScale enumerated constants. Choices are MccDaq.TempScale.Celsius, MccDaq.TempScale.Fahrenheit, and MccDaq.TempScale.Kelvin.

units defaults to MccDaq.TempScale.Fahrenheit.

## Returns

- An ErrorInfo object that indicates the status of the operation.

## Notes

- The timeFormat and timeZone preferences are applied to all time data returned using API methods that return time data.
- The units preference specifies the temperature scale that the API applies when reading and converting analog, CJC, and time stamped data.