Life, the Internet, and Everything!

Cheat Sheets

Tips for Using Time Stamps in ILE RPG

Some notes regarding timestamps. Defining a Timestamp A timestamp is stored as a 26 character field. But, the system looks at it as a special data type and enforces the rules it has set up for timestamps. The format for a timestamp is is YYYY-MM-DD-HH.MM.SS.XXXXXX (Year-Month-Day-Hour.Minute.Second.Milliseconds). An example would be ‘2011-09-14-’ (Year: 2011 / Month: 09 […]

Continue Reading

PHP/MYSQL String Tricks

Heres a couple things I constantly forget. Im including them here so Ill have them for future reference. How to “Scan and Replace” a String in MYSQL ( Note the AS400-ish phrasing of that title). Big Note: Be really mindful of serialized information !!!! ( I actually utilized the code above to “transfer” a lot […]

Continue Reading

Free Format RPG ILE Alternatives to the TIME Opcode

// V5R2:. Wtime = %Dec(% Char(% Time(): * ISO0):6:0); < In my programs, I produce a data structure like this: D DS D Dtime 14 0 D Wdate 8 0 Overlay( Dtime). D Wtime 6 0 Overlay( Dtime: * Next). Ive been utilizing TIME to assign a worth to Dtime, then I utilize Wtime and […]

Continue Reading