Use @Hour
- hours are represented as 0 through 23 for 12 AM through 11 PM.
Code for a two digit hour string:
cHour := @Right("0" + @Text(@Hour(@Now)); 2);
Your formula will work only for English/American time/data string conversion. It wouldn't work for German e.g.
Better you use other @Functions too: @Year, @Month, @Day, @Minute, @Second
:
REM {Get the mm value};
cMonth := @Right("0" + @Text(@Month(@Created)); 2);
REM {Get the dd value};
cDay := @Right("0" + @Text(@Day(@Created)); 2);
REM {Get the yyyy value};
cYear := @Text(@Year(@Created));
cHour := @Right("0" + @Text(@Hour(@Now)); 2);
cMinute := @Right("0" + @Text(@Minute(@Now)); 2);
cSecond := @Right("0" + @Text(@Second(@Now)); 2);