0% found this document useful (0 votes)
98 views7 pages

Activator - Createinstance (Typeof (Kkryczka) ) : Datetime Controls in Pi Processbook Display

The document discusses adding date and time picker controls to an OSISoft PI ProcessBook display. It describes inserting the controls, configuring their properties like date/time formats, and using VBA code to populate the controls with the current date and time when a button is clicked. The controls allow viewing and selecting dates and times in the ProcessBook display.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views7 pages

Activator - Createinstance (Typeof (Kkryczka) ) : Datetime Controls in Pi Processbook Display

The document discusses adding date and time picker controls to an OSISoft PI ProcessBook display. It describes inserting the controls, configuring their properties like date/time formats, and using VBA code to populate the controls with the current date and time when a button is clicked. The controls allow viewing and selecting dates and times in the ProcessBook display.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

DateTime controls in PI ProcessBook display | Activator.

CreateInstance(typeof(kkryczka)); Page 1 of 7

Activator.CreateInstance(typeof(kkryczka));

HOME ABOUT ME DISCLOSURE

.NET DATA ACCESS BI PRESENTATION IBM MAXIMO RDBMS SHAREPOINT OSISOFT PI XML

← Major features and functionality removed from ASP.NET RSS Feed IHttpHandler with Entity Framework
SharePoint Foundation 2010 → Enter your em
DateTime controls in PI ProcessBook display and receive no

01/14/2011 LEAVE A COMMENT Join 58 other f

Date Time controls are added into display. The Set Dates button sets all of the controls to
the current date and time according to format controls are configured.

Open your ProcessBook display and change to Build mode.

Follow

http://kkryczka.wordpress.com/2011/01/14/datetime-controls-in-pi-processbook-display-2/ 16/3/2013
DateTime controls in PI ProcessBook display | Activator.CreateInstance(typeof(kkryczka)); Page 2 of 7

Click on the “Insert Control” button and select “Microsoft Date and Time Picker Control 6.0″,
as shown in the picture below:

The Object is inserted on the display:

In Build mode select Properties of the control:

Short Date Format:

Follow

http://kkryczka.wordpress.com/2011/01/14/datetime-controls-in-pi-processbook-display-2/ 16/3/2013
DateTime controls in PI ProcessBook display | Activator.CreateInstance(typeof(kkryczka)); Page 3 of 7

Time Format:

Follow

http://kkryczka.wordpress.com/2011/01/14/datetime-controls-in-pi-processbook-display-2/ 16/3/2013
DateTime controls in PI ProcessBook display | Activator.CreateInstance(typeof(kkryczka)); Page 4 of 7

Date and Time Format:

The CustomFormat property of the DateTimePicker control is case-sensitive.

hh- hours (12-hour clock)

HH – hours (24-hour clock)

mm- minutes

ss- seconds

MM – month

yyyy – year

Follow

http://kkryczka.wordpress.com/2011/01/14/datetime-controls-in-pi-processbook-display-2/ 16/3/2013
DateTime controls in PI ProcessBook display | Activator.CreateInstance(typeof(kkryczka)); Page 5 of 7

Click on the “Insert Control” button and select “Microsoft Forms 2.0 CommandButton”, as
shown in the picture below:

In Build mode open the VBA Editor and enter the following code:

Follow

http://kkryczka.wordpress.com/2011/01/14/datetime-controls-in-pi-processbook-display-2/ 16/3/2013
DateTime controls in PI ProcessBook display | Activator.CreateInstance(typeof(kkryczka)); Page 6 of 7

Private Sub CommandButton1_Click()

Dim dtmDate As Date


dtmDate = DateValue(Now)

Dim dtmTime As Date


dtmTime = TimeValue(Now)

Dim dtmDateTime As String

dtmDateTime = Format(Now, “hh:mm dd/mm/yyyy”)

Me.DTPicker1.Value = dtmDate
Me.DTPicker2.Value = dtmTime
Me.DTPicker3.Value = dtmDateTime

End Sub

Click Save and Close VBA Editor

Change to Run Mode

Follow

http://kkryczka.wordpress.com/2011/01/14/datetime-controls-in-pi-processbook-display-2/ 16/3/2013
DateTime controls in PI ProcessBook display | Activator.CreateInstance(typeof(kkryczka)); Page 7 of 7

FILED UNDER OSISOFT PI, PI PROCESSBOOK TAGGED WITH PI PROCESSBOOK

Leave a Reply

Enter your comment here...

Blog at WordPress.com.

Follow

http://kkryczka.wordpress.com/2011/01/14/datetime-controls-in-pi-processbook-display-2/ 16/3/2013

You might also like