I don't think you need your script to do this. The date and time fields (or a single timestamp field) can be set up with an auto-enter option in field options to enter the date and time that the record was created and/or the date and time it was last modified.
If you choose to use a script anyway, use:
Set Field [Yourtable::datefield ; Get ( CurrentDate ) ]
Set Field [YourTable::timeField ; get ( CurrentTime ) ]
That way, the data is assigned to the current record before creating the new record. If your button currently refers to the New Record/Request step in button setup, you'll need to create the above script and use the perform script option in Button Setup to perform this script.
Beautiful! I was using "Insert Current Date" which wasn't working. Thanks so much!
The "insert" steps require that the field be physically present on the layout or they silently fail. (You have to specifically test for an error code or note that the field's value never changed to know that it failed.)
That's why I avoid the Insert steps except when it is impossible to use an alternative.
Thanks for that explanation! Now I know what I was doing wrong - and I appreciate your replying back with why my method did't work.