Using timestamp without using computer time

Asked 2 years ago, Updated 2 years ago, 56 views

Private Sub group_DataChange(TransactionID As Integer, NumItems As Integer, ByRef ClientHandles As Array, ByRef ItemValues As Array, ByRef Qualities As Array, ByRef TimeStamps As Array) Handles group.DataChange

    Dim UpdateParkListDisplay As Boolean = False
    Dim UpdateBellListDisplay As Boolean = False
    Dim UpdateDisasterListDisplay As Boolean = False

    For i As Integer = 1 To NumItems
        OPCTag(ClientHandles(i)).Value = ItemValues(i).ToString

        'Update List info
        Select Case ClientHandles(i)
            Case 1 To Park_No '21    'Park Info
                UpdateParkListDisplay = True
                'Exit Select
            Case Park_No + 1 To Bell_Status_No '175  'Bell Status
                BellList(ClientHandles(i) - Park_No).EventTime = Now.ToLongDateString + Now.ToLongTimeString
                BellList(ClientHandles(i) - Park_No).status = OPCTag(ClientHandles(i)).Value
                UpdateBellListDisplay = True
            Case Bell_Status_No + 1 To Bell_Title_No '329 'Bell Title
                BellList(ClientHandles(i) - Bell_Status_No).Title = OPCTag(ClientHandles(i)).Value
                UpdateBellListDisplay = True
            Case Bell_Title_No + 1 To Bell_Stair_No '483 'Bell Stair
                BellList(ClientHandles(i) - Bell_Title_No).stair = OPCTag(ClientHandles(i)).Value
                UpdateBellListDisplay = True
            '--------------------------------------------------------------------------------------------------
            Case Bell_Stair_No + 1 To Disaster_Status_No '587 'Disaster Status
                DisasterList(ClientHandles(i) - Bell_Stair_No).EventTime = Now.ToLongDateString + Now.ToLongTimeString
                DisasterList(ClientHandles(i) - Bell_Stair_No).status = OPCTag(ClientHandles(i)).Value
                UpdateDisasterListDisplay = True
            Case Disaster_Status_No + 1 To Disaster_Title_No '691 'Disaster Title
                DisasterList(ClientHandles(i) - Disaster_Status_No).Title = OPCTag(ClientHandles(i)).Value
                UpdateDisasterListDisplay = True
            Case Disaster_Title_No + 1 To Disaster_Stair_No '795 'Disaster Stair
                DisasterList(ClientHandles(i) - Disaster_Title_No).stair = OPCTag(ClientHandles(i)).Value
                UpdateDisasterListDisplay = True
            Case Else
                'Exit Select
        End Select

If you look at the code above, BellList(ClientHandles(i) - Park_No).EventTime = Now.ToLongDateString + Now.ToLongTimeString

이부분에 BellList값이 변경이되면 그 변경된 시간을 컴퓨터의 시간을 가져와서 보여지게 되는데요

I'm going to use ByRef Time Stamps As Array to print this part with a timestamp, not computer time, so how should I modify the coding?

Please give me a noble answer.

timestamp now.tolongdatestring

2022-09-22 20:19

1 Answers

I don't think there's an answer because the question is not clear.

The meaning of the timestamp is 'time'.

Computer time can also be a timestamp, and unix epoch time can also be a timestamp. Any way you can express the current time can be a timestamp.

The expression 'timestamp, not computer time' is not clear.

It should be clear whether the time stamp intended in the question is from 1970 to the beginning of the past when the unix epoch time.Haha


2022-09-22 20:19

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.