Windows Scripting
  Home arrow Windows Scripting arrow VBScript: Converting and Formatting with F...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WINDOWS SCRIPTING

VBScript: Converting and Formatting with Functions
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-05-27

    Table of Contents:
  • VBScript: Converting and Formatting with Functions
  • The Function with Character
  • Express Your In(teger) Self
  • CSng, the Loneliest Function of them All!
  • Witchy Woman Put a Hex On You

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    VBScript: Converting and Formatting with Functions


    (Page 1 of 5 )

    In our last tutorial, I tried to cover as many of the Conversion and Formatting functions of VBScript as possible. As it turned out, I only got halfway through the Conversion functions. This time, I will get through the rest of the Conversion functions, and maybe even get to the Formatting functions.

    In fact, this time, I vow to get through at least the rest of the Conversions, or my name isn't Big James Stud. It's a lot to cover, and I really want my name to stay Big James Stud, so let's stop all the yapping and get to tapping. On the keyboard.

    Here's the table I know you missed so badly:



    Function

    What It Does

    Type of Function

    Asc

    Used to convert the first letter in a string to ANSI

    Conversion

    CBool

    Used to convert an expression to Boolean

    Conversion

    CByte

    Used to convert an expression to a Byte

    Conversion

    CCur

    Used to convert an expression to a Currency

    Conversion

    CDate

    Used to convert an expression to a Date

    Conversion

    CDbl

    Used to convert an expression to a Double

    Conversion

    Chr

    Used to convert an ANSI Code to a character

    Conversion

    CInt

    Used to convert an expression to an Integer

    Conversion

    CLng

    Used to convert an expression to a Long

    Conversion

    CSng

    Used to convert an expression to a Single

    Conversion

    CStr

    Used to convert an expression to a String

    Conversion

    Hex

    Used to retrieve the hexadecimal value of a number

    Conversion

    Oct

    Used to retrieve the octal value of a number

    Conversion

    FormatCurrency

    Used to return and format an expression as currency

    Format

    FormatDateTime

    Used to return and format an expression as a date or time

    Format

    FormatNumber

    Used to return and format an expression as a number

    Format

    FormatPercent

    Used to return and format an expression as a percent

    Format


    More Windows Scripting Articles
    More By James Payne


       · In our last tutorial, I tried to cover as many of the Conversion and Formatting...
     

    WINDOWS SCRIPTING ARTICLES

    - More Windows Scripting Workarounds from Nilpo
    - Overloading Methods and More in VBScript
    - Improving MFC for Windows Vista
    - Regular Expressions in VBScript
    - Working with Dates in WMI
    - Completing Calendars with VBScript Date Func...
    - Building Calendars with VBScript Date Functi...
    - Working With Dates and Times in VBScript
    - Designing WCF DataContract Classes Using the...
    - Understanding Dates and Times in VBScript
    - Working With Arrays in VBScript
    - Compressed Folders in WSH
    - Using .NET Interops in VBScript
    - Nilpo`s Scripting Secrets, Vol I
    - Database operations using Silverlight 2.0 WC...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek