Saturday, August 29, 2020

Format, Math & Conversion Functions in Visual Basic:

Format Functions:

  Print format(“15/8/47”, “d/m/yy”) gives 15/8/47

  Print format(“15/8/47”, “dd/mm/yy”) gives 15/08/47 

  Print format(“15/8/47”, “ddd/dd/mmm/yy”) gives fri/15/aug/47 

  Print format(“15/8/47”, “dddd/dd/mmmm/yyyy”) gives Friday/15/August/2047 

  Print format(“Time”, “h:m:s am/pm”) gives Current time in 12 Hour format 

  Print format(“Time”, “hh:mm:ss am/pm”) gives Current time in 24 hours format

  Format(5459.4, ”##,##0.00”) gives “5,459.40”

  Format(334.9, ”##0.00”) gives “334.90”

  Format(“Hello”,”<”) gives “hello”

  —  Format(“Hello”,”>”) gives “HELLO” 


Conversion Functions:

Math Functions: