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
stringThe 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
The kind of returned date/time may be different depending on the client platform. From DataMiner 10.5.4/10.6.0 onwards, GetClientDateTime(string) can be used to get the date/time as it is displayed. Enable ClientTimeInfo on the item to make sure the info is available.