Sei sulla pagina 1di 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

Potrebbero piacerti anche