WrapFormat is an ASP component that provides the more powerful Format functions of Visual Basic instead of the
seriously limited VBScript Format functions (FormatdateTime, FormatCurrency etc). Anyone familiar with Visual Basic's
format$ function, will apprecaite having this functionality in ASP. The component is complete
freeware and can be downloaded from here (1,471,555 bytes).
If you have Visual Basic 5.0 with Service Pack 3 installed, you can download the DLL itself from
here (10,240 bytes). In such a case save the file to your windows system directory and register it
by running regsvr32 c:\windows\system\wrapformat.dll. If your are not familiar regsvr32, then rather download the full install.
WrapFormat is very simple to use. It provides a single method as follows :
|DoFormat(varData,[strFormatString])||Formats the variant according to the optionally passed Format String
The key lies in the strFormatString data, which can contain detail on how to format the varData variable for
dates, numbers, and strings.
Sample ASP Code for using the component is as follows :
Set W = Server.CreateObject("WrapFormat.Format")
' Use this for numeric formatting :
Response.Write "Here is 22000 formated as a currency : " & W.DoFormat(22000,"ZAR ###,###,##0.00")
' Use this for DateTime formating
Response.Write "The date is now : " & W.DoFormat(Now,"d-mmmm-yyyy hh:mm:ss")
Set W = Nothing
June 1, 1999 : Initial Release V1.00.0002
This Webpage was written in a great hurry, so it is really not good looking or anything like that. Please excuse the
psychedelic colours. When I get time one day, I'll make a decent page. If you wish to mail me any comments, feel free
to do so at email@example.com
|accesses since 24-Jul-1999|