Table of Contents

Method GetDateTime

Namespace
Skyline.DataMiner.Automation
Assembly
SLManagedAutomation.dll

GetDateTime(string)

Gets the date/time that was selected in the specified destination variable that is linked to a Calendar item.

public DateTime GetDateTime(string key)

Parameters

key string

The name of the destination variable.

Returns

DateTime

The date/time that was selected in the specified destination variable that is linked to a Calendar item.

Examples

UIResults uir = null;
DateTime selection = DateTime.Now;
...
UIBlockDefinition blockCalendar = new UIBlockDefinition();
blockCalendar.Type = UIBlockType.Calendar;
blockCalendar.InitialValue = selection.ToString("dd/MM/yyyy HH:mm:ss");
blockCalendar.DestVar = "calendar";
blockCalendar.WantsOnChange = true;
...
uib.AppendBlock(blockCalendar);
...
uir = engine.ShowUI(uib);
selection = uir.GetDateTime("calendar");

Remarks

note

Prior to DataMiner 10.0.12, this method only supports the parsing of datetimes in the format dd/MM/yyyy HH:mm:ss. From DataMiner 10.0.12 onwards, ISO format is supported.