VBScript Built-In-Functions

     


 VbScript Contains many Functions those are Derived From Visual Basic or Simply Vb Language There are Many Built in Functions those are Used according to Particular data types and needs Generally there as Following Functions.

  1. Type Casting Functions :- Used For converting a Data of One date type into Another Like Converting an Integer to String and A Integer into Boolean etc.
  2. Arithemetic Functions:- These are used for Performing Mathemetical Operations Like Square Root and Finding Sine,Cosine etc
  3. Format Functions:- These are another types of Built in Functions those are used For Changing Display or Layout of data in Some Different Formats
  4. Date and Time Functions:- These Functions are used for Operating Operations on date and Time
  5. String Functions:- The String Functions are used for Manipulating Strings Like Finding Length of String ,Reverse of a String and Extracting Some Characters From a String all these operations are Performed with the help of String Functions


Type Casting Functions

Type Casting Funtions includes Following Functions

  1. Cbool:- For Converting a Number into Boolean It Returs true if you Assign a Value to variable and false if a Variable is Empty
  2. Cint:- Converts a String or Double into Integer
  3. Csng:- Converting a Variable into Single Data type
  4. Ccur:- Converting a Variable into Currency
  5. Cbyte:- Converting a Variable into byte data type which tekes only positive and not Decimal Numbers .
  6. Chr:- This Will Gives us a Character of a Number or Simply This Will Convert a Number into a Character According to the Ascii Table Like Char of 65 is A etc
  7. Asc::- This Function will gives us a Character of Respective Number To This Will Convert a Number into the Character
  8. Cdate:- This Will Converts a String into date.

Arithmetic Functions Includes
  1. Abs:- This will Return a Abscolute Value Means it Converts negative number into positive number
  2. Sin- this Will Gives us Sin of a Number
  3. Rnd:- this Functions Will Return a Rando Value that will be from greater than 0 and less than 1 or in other words value between 0 and 1
  4. Round:- This Functions Will Return a Round Value Like When Decimal Places when Five is Encountered then this will gives one ncrements to the number
  5. Sqr:- This will Return a Square Root of a number
  6. Fix:- This Function will Return us a Integer Value of a Number
  7. Sgn:- This will Return us a Sign of a Number Either a Number is Positive or Negative.
  8. Int:- This will Gives us a Integer Value From Float.


String Functions Include
  1. Len:-This will Return you Length or Total Number of Characters in a String
  2. Lcase:- This will Return you Lower case of a String
  3. Ucase:- This will Return you Upper Case of String
  4. Left:- This will Return you the Characters from Left side those are Specified by you
  5. Right:- This will Return you the Characters From Right side those are Specified by you
  6. Ltrim:- this will Removes the Spaces those are Placed in Left of String
  7. Rtrim:- This Will Removes the Spaces Those are Placed in Right of String
  8. Mid This Will Returns you Mid of String or a Mid Functions Returns us a Substring by First Accepting Starting Point of String and Total Number of Characters Specified From Starting Point to End of String
  9. Strcomp:- This Function is used for Comparing two Strings Either they are Equals or not And This will Gives us Result in three Forms Either 0 if Two Strings are Equals and 1 if First string is Greater then Second and –1 if First string is Less than First String
  10. Instr:- This is Used for Finding the Position of String into a String this Will Returns us a Integer Number Where it Found First Occurrence of a String
  11. Replace:- This Functions is used for Replacing a String With Another String This Will Replace All occurrence of a String
  12. Trim:- This Will Removes Spaces From both Sides Left and Right Spaces are Removed Those are Given in a String


Date Functions
The Date Functions are used for Manipulating Dates and Extracting Day ,month and year etc from Date that is Specified it Includes :-
  1. Date:- This Function Will Return us Current date of system
  2. DateAdd Functions:- This Functions will Returns a Date After Adding Some Intervals into the date like Days, Months and Years The DateAdd Function Will Add Days if you Specified d as DateAdd There are Some Intervals Those are Added to the Date
  3. M:- For Month
    D:- For Days
    Yyyy:- For Year
    W:- Weekday
  4. DateDiff Functions:- This Function Will Gives us differene of two Dates in days, Months,years and also Weeks etc
  5. This Uses M For Finding Months, Years, and d For Days Those are differ in two Dates
  6. DatePart Function:- This Function Will Gives us a Part of date like Month of Date and year of date and day of date are Extracted with the help of DatePart Function
  7. Day Functions :- This Functions will gives you the Current date only Date like 11 etc
  8. Month:- This Will Returns You Month In Number From Date
  9. Year:- This Function Will Gives you an Year From a date
  10. Now: This Functions will Returns you current date and time of your system
  11. Isdate:-used for Checking either Specified Number or string is in Date Format
  12. Monthname:- This Will Converts a Month into name
  13. Weekday Functions:- This Will Gives us an Weekday of Date Like Sunday as 1 and Tuesday as 3 etc
  14. WeekDayName:- This Will Gives us name of weekday instead on number


FormatDateTime Functions
This Functions are used for Changing the display of current data This Will Convert a data into Specified Format
  1. FormatCurrency:-This Will Convert a Number into a Currency Format by Placing a Currency Sign into the Front of Number
  2. FormatNumber:- This Will Convert a number into a Comma Style Number
  3. IsNull Functions:- This Functions is used for Checking either a Varible Contains Valid data or either value of Variable is Missing but not Zero Whether a Value is Specified to a Variable


Other Functions
  1. ISEmpty:- Also Checks For Whether a Value of Variable is Specified or not
  2. IsNumeric:- For Checking Whether a Value of Variable is Number in nature
  3. IsObject:- Cheks For a Varible Either it is an Object of Specific Application
  4. CreateObject:- This is used for Creating an Object of an Application
  5. TypeName:- This Functions Will Returns you name of data type which you are using by checking your data of variable
  6. Vartype:- This Will Returns you a Number of data type By Checking your data f Varible Like 0 For Empty and 8 For string etc
  7. ScriptEngine :- Will Return name of Script Language that is Curretly used by your Browser For Making a Request to Server
  8. ScriptEngineMajorVersion:- This Function Will Gives us the Version of current Version of Web Browser that is used by user For Making a Request to Server and Provided by Windows itself
  9. ScriptEngineMinorVersion:- This Functions Will Gives us the Version of Current Web Browser that is Installed by User or next highest Version that is Installed on Machine by user
  10. Rgb Function :- This Function will Return a Number that is Given by the RGB Function After Making a Code by Using Red and Green and blue Colors Ranges those are Provided in Function but Always Remember Range of all Color are from 0 to 255 .
  11. GetLocale Function:- The GetLocal Function will Return a number that is Specified by Server Which is determined by your System Languages, region, and keyboard Layout etc.
  12. LoadPicture:- This Method is used for Loading a Picture into the Application this Method Works When the Application will Starts and then it will searches for the Picture into the Path that is Supplied in LoadPicture Method.






Share on Google Plus
    Blogger Comment
    Facebook Comment