• Not Answered

PHV command line argument for starttime earliest

Does anybody know the command line argument for setting the start time of Process History View to "Earliest"?

I have a button on a motor detail display that opens a history of trip events using a script like this:

sTripList = "CHS My_Trip_List.phvv /starttime (1/1/2014) /endtime * /module (" & Me.ModuleName.Caption & ")"

RetVal = Shell(sTripList, 1)

I would like to replace the specific date in the command with earliest, just as if I'd checked that box in the time filter dialog. I am sure that "/starttime earliest" worked in the past but my v12 system doesn't like it.

Thanks.

4 Replies

  • Hi Rob

    You can use the "DateTime.Date" to get the actual date.

    Example :

    sTripList = "CHS My_Trip_List.phvv /starttime (" & DateTime.Date & _

                ") /endtime * /module (" & Me.ModuleName.Caption & ")"

  • In reply to Jack_France:

    PS : If you plan to add time to the date, you must quote the whole data :

    sTripList = "CHS My_Trip_List.phvv /starttime """ & Now & _

                """ /endtime * /module (" & Me.ModuleName.Caption & ")"

    Note the replacement of the ( and ) by a double " inside the string., before AND after the date & time format.

  • In reply to Jack_France:

    Jack,

    Thanks for the reply but setting starttime to a specific date or time is not the problem.

    How can I set it to "earliest" the same way that entering "/endtime *" sets the end time to "Latest"? I know I can set the start time to a date like 1/1/1900 as a workaround.

    Rob

  • In reply to RobPerry:

    So sorry Rob.

    I was mistaken about your question because I have confused the earlier data and "laster" one.

    So, excuse me but I don't know how to ask to the server what is the oldest date and time for a data.