The VBA Format CommandThe first is an expression and the 2nd is the format. So for example... Format(date, "yyyymmdd-hhnnss" would return the string... 20070709-231525 Format(date, "mm/yyyy" would return... 07/2007 For numbers... Format(7.5, "00.00") would return... 07.50 Format(7.5, "##.##") would return.. 7.5 For hours use h (0-23) or hh for (01-23) Use n or nn for minutes and s or ss for seconds. Return from The VBA Format Command to VBA Code Samples |