Guest Chrisksyeung Report post Posted 01/09/2020 09:06 AM Dear Sir SInce I use this script to record the attendence Const ForReading = 1 Const ForWriting = 2 Const ForAppending = 8 set fso = CreateObject("Scripting.FileSystemObject") set tsFile = fso.OpenTextFile("c:\Program Files\VoiceGuide\Scripts\Meter Reading\IVRPrivate.txt", ForAppending, True) If $RV_HH > 12 Then ihh =right("0" &cstr($RV_HH - 12),2) tsFile.WriteLine "20$RV_YY/$RV_MM/$RV_DD PM " & ihh & ":$RV_NN:$RV_SS" & vbTab & "$RV_CIDNUMBER" & vbTab & "$RV[GetID]" Else tsFile.WriteLine "20$RV_YY/$RV_MM/$RV_DD AM $RV_HH:$RV_NN:$RV_SS" & vbTab & "$RV_CIDNUMBER" & VbTab & "$RV[GetID]" End If tsFile.Close set tsFile = Nothing set fso = Nothing The output file is 2020/01/07 AM 07:10:54 64361603 10751 Can I add one output file with 2020/01/07 07:10:54 AM 64361603 10751 This mean move AM location to back Thanks Share this post Link to post
SupportTeam Report post Posted 01/09/2020 10:09 AM sound like you want to change the line: tsFile.WriteLine "20$RV_YY/$RV_MM/$RV_DD PM " & ihh & ":$RV_NN:$RV_SS" & vbTab & "$RV_CIDNUMBER" & vbTab & "$RV[GetID]" to be: tsFile.WriteLine "20$RV_YY/$RV_MM/$RV_DD " & ihh & ":$RV_NN:$RV_SS PM" & vbTab & "$RV_CIDNUMBER" & vbTab & "$RV[GetID]" and the line: tsFile.WriteLine "20$RV_YY/$RV_MM/$RV_DD AM $RV_HH:$RV_NN:$RV_SS" & vbTab & "$RV_CIDNUMBER" & VbTab & "$RV[GetID]" to be: tsFile.WriteLine "20$RV_YY/$RV_MM/$RV_DD $RV_HH:$RV_NN:$RV_SS AM" & vbTab & "$RV_CIDNUMBER" & VbTab & "$RV[GetID]" Share this post Link to post