Windows Scripting
  Home arrow Windows Scripting arrow VBScript: Conversion and Format Functions
Moblin
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  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Actuate Whitepapers 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
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: 5 stars5 stars5 stars5 stars5 stars / 1
    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

    Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!

    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

    - Understanding Procedures in VBScript
    - Printing Documents in WSH
    - Generating Outlook Signatures Based on Activ...
    - VBScript: Converting and Formatting with Fun...
    - VBScript: Conversion and Format Functions
    - VBScript: Array Functions
    - VBScript: Strings, You Can`t Function withou...
    - VBScript: More String Functions
    - VBScript: Functioning with Strings
    - Working with the Windows Registry in C++
    - Understanding Objects
    - HTML Applications: Giving WSH a User Interfa...
    - Modifying Computer Objects with Active Direc...
    - Logon Script to Send Email Notifications
    - Securing Computers and Active Directory





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway