This procedure(below) is called back-to-back and is not a custom SQR. It's canned from PS. Notice the do get-current-datetime call and the population of $rundatetime. I did some shows and it is running get-current-datetime both times, but for some reason(bug?) the $rundatetime value from the second is the same as from the first.
There's something else, this might help diagnose. When I run the datenow() function in a SQR using the {native-datetimemask} back-to-back waiting a span of seconds it returns the same value. This is not right. I appreciate your expertise. Thank you.
! Refresh the current Date/Time
Do Get-Current-DateTime
Move $_AsOfToday to $RunDate
Move $_SysDateTime to $RunDateTime
Move $_username to $Oprid
Let $PlanTypeHist = Rtrim($PlanType,' ')
If $PlanTypeHist = ''
Let $PlanTypeHist = ' '
End-If
BEGIN-SQL
INSERT INTO PS_BN_SNAP_HIST
(ASOFDATE
,RUNDATE
,RUNDTTM
,BN_SNAP_HIST_TYPE
,SETID
,VENDOR_ID
,PLAN_TYPE
,OPRID
,FILENAME
,RECORD_COUNT
,SCHED_ID)
VALUES
($AsOfDate
,$RunDate
,{DateTimeIn-Prefix}$RunDateTime{DateTimeIn-Suffix}
,$BNSnapHistType
,$SetId
,$VendorId
,$PlanTypeHist
,$Oprid
,$FileName
,#WriteCount
,' ')
END-SQL
SQL Server 2000
PT 8.19.12