Using the time zone UDF I created in RPG [email protected] (Simon Hutchinson)

​Yesterday I showed how to create a SQL User Defined Function, UDF, to return the current timestamp for another time zone. Several people messaged me asking me how I would use this in a RPG program. Rather than answer them individually I thought would share my answer with you all. I could think of two examples of when I would use the THEIR_TIMESTAMP UDF in a RPG program: I want to retrieve the timestamp from the UDF into a RPG variable, that I can then use elsewhere in the program Use it as part of an SQL Insert statement into a DDL Table or DDS file Let me start with the first scenario: retrieving the timestamp from the UDF into RPG variables: Read more » Read More 

Verified by MonsterInsights