Windows Scripting
  Home arrow Windows Scripting arrow VBScript: Conversion and Format Functions
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: Conversion and Format Functions
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 2 stars2 stars2 stars2 stars2 stars / 3
    2008-05-19

    Table of Contents:
  • VBScript: Conversion and Format Functions
  • The Asc() Function
  • CBool...CBool Run
  • CCur...Did I Stutter? Oh Yeah, I Guess I Did
  • This Next Part Will Make You CDbl()

  • 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: Conversion and Format Functions


    (Page 1 of 5 )

    In our last article we discussed String, Date, and Math functions. In this article we will cover Conversion and Formatting functions. Since these functions mostly deal with data types, which we've already covered in great detail, I won't spend a lot of time on each one. There are a lot of them, however, and I will cover as many of them as I can in this article.

    But first, a table:


    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


       · Welcome back. In this article we will cover Conversion and Formatting functions. If...
     

    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 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek