Posts

Showing posts from April, 2016

Current Date on Report Script

declaration:    domain tcmcs.str50m i.curr.date footer.1:    before.layout:       i.curr.date = sprintf$("Issue %u(%02d-%02m-%04Y) %U(%02h:%02m)", utc.num(), utc.num()) Result = Issue 25-12-2016 10:00

changeToWords (English Language)

Code Function Public Shared Function changeToWords(ByVal numb As [String]) As [String]     Dim val As [String] = "", wholeNo As [String] = numb, points As [String] = "", andStr As [String] = "", pointStr As [String] = ""     Dim endStr As [String] = ""     Try         Dim decimalPlace As Integer = numb.IndexOf(".")         If decimalPlace > 0 Then             wholeNo = numb.Substring(0, decimalPlace)             points = numb.Substring(decimalPlace + 1)             If Convert.ToInt32(points) > 0 Then                 andStr = "point"                 ' just to separate whole numbers from points                 pointStr = translateCents(points)             End If         End If         val = [String].Format("{0} {1}{2} {3}", translateWholeNumber(wholeNo).Trim(), andStr, pointStr, endStr)     Catch             End Try     Return val End Function Private Shared Function translateWholeNumber(ByVal n