VBScript Session 10.

Slides:



Advertisements
Similar presentations
Manipulating Strings String Functions. VB provides a large number of functions that facilitate working with strings. These are found in Microsoft.VisualBasic.Strings.
Advertisements

Building Java Programs
Return values.
Proyek Queri-queri Lanjut dan Sub-subqueri. Variables dan Data.
Slide 1 VB Programming Fundamentals. Slide 2 Visual Basic Language v VB language is powerful and easy to use v Descendent of BASIC (Beginner's All-Purpose.
Input Dialog Box An input dialog box can be used to obtain a single item of input from the user Presents a window (dialog box) requesting input Syntax:
VB Built-in Functions School of Business Eastern Illinois University © Abdou Illia, Spring 2003 (Week 5, Monday 2/10/03)
1 Pertemuan 04 Expression Matakuliah: D0524 / Algoritma dan Pemrograman Komputer Tahun: 2005 Versi:
Databases Lab 5 Further Select Statements. Functions in SQL There are many types of functions provided. The ones that are used most are: –Date and Time.
Strings in Visual Basic Words, Phrases, and Spaces.
Introduction to Oracle9i: SQL1 Selected Single-Row Functions.
Introduction to Computing Dr. Nadeem A Khan. Lecture 14.
Introduction to Computing Dr. Nadeem A Khan. Lecture 6.
On to… string operations & functions. Concatenation (&) §When we want to combine two character strings into one new (longer) string, we can concatenate.
Lecture 6 29/1/15. Number functions Number functions take numbers as input, change them, and output the results as numbers. 2.
BACS 287 Visual Basic String Manipulation. BACS 287 Visual Basic Strings In Visual Basic, a “string” is a series of text, numbers, and special characters.
Strings PART II STRING$ AND SPACE$. Create strings of specified number String$ creates string of specified character Space$ creates string of spaces Example:
Dani Vainstein1 VBScript Session 9. Dani Vainstein2 What we learn last session? VBScript coding conventions. Code convention usage for constants, variables,
EG280 - CS for Engineers Chapter 2, Introduction to C Part I Topics: Program structure Constants and variables Assignment Statements Standard input and.
Access Level Three [Functions] & “ And “ & [Expressions]
CS0004: Introduction to Programming Input and Output.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 9 More About Strings.
Manipulation Masterclass By the VB Gods. In this masterclass, we will learn how to use some of the string manipulation function such as Len, Right, Left,
IMS 3253: Math 1 Dr. Lawrence West, MIS Dept., University of Central Florida Topics Five Fundamental Math Operations Precedence of Math.
Chapter 10 Selected Single-Row Functions Oracle 10g: SQL.
Chapter 5 Selected Single-Row Functions. Chapter Objectives  Use the UPPER, LOWER, and INITCAP functions to change the case of field values and character.
CIS 338: Operators and Formatting in VB.NET Dr. Ralph D. Westfall April, 2011.
Oracle 11g: SQL Chapter 10 Selected Single-Row Functions.
Manipulating Strings. What is a string? Data composed of text characters. The data is stored in consecutive bytes of memory. Each byte stores the ASCII.
EXPRESSION Transformation. Introduction ►Transformations help to transform the source data according to the requirements of target system and it ensures.
Visual Basic I Programming
‘Tirgul’ # 2 Enterprise Development Using Visual Basic 6.0 Autumn 2002 Tirgul #2.
Introduction As programmers, we don’t want to have to implement functions for every possible task we encounter. The Standard C library contains functions.
Lecture 8 – SQL Joins – assemble new views from existing tables INNER JOIN’s The Cartesian Product Theta Joins and Equi-joins Self Joins Natural Join.
Variable, Constants and Calculations Dr Mohammad Nabil Almunawar.
SQL Functions. SQL functions are built into Oracle Database and are available for use in various appropriate SQL statements. These functions are use full.
H2K Infosys is business based in Atlanta, Georgia – United States Providing Online IT training services world wide. USA - +1-(770) ,
CECS 5020 Computers in Education Visual Basic Variables and Constants.
Introduction to Computing Dr. Nadeem A Khan. Lecture 7.
4/2/16. Ltrim() is used to remove leading occurrences of characters. If we don’t specify a character, Oracle will remove leading spaces. For example Running.
1 Inside Module 8 Extracting Data Page n Using the Extract command2 n Coercion3 n $-functions4 n Extract from a table7.
[ ] Square brackets enclose syntax options { } Braces enclose items of which only one is required | A vertical bar denotes options … Three dots indicate.
02/03/ Strings Left, Right and Trim. 202/03/2016 Learning Objectives Explain what the Left, Right and Trim functions do.
Strings PART I STRINGS, DATES, AND TIMES. FUNDAMENTALS OF CHARATERS AND STRINGS VB represents characters using American National Standards Institute(ANSI)
CHAPTER FOUR Performing Calculations and Manipulating Data: Expressions.
1 VB-06-String Manipulation Mar 03, 2002 String Function VISUAL BASIC.
CSC 162 Visual Basic I Programming. String Functions LTrim( string ) –Removes leading spaces from the left side of string RTrim( string ) –Removes trailing.
13/06/ Strings Left, Right and Trim. 213/06/2016 Learning Objectives Explain what the Left, Right and Trim functions do.
Chapter 3 - Visual Basic Schneider. Private Sub cmdEvaluate_Click() Dim n As Single, root As Single n = 6.76 root = Sqr(n) picResults.Print root; Int(n);
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Third Edition by Tony Gaddis.
Week 3 - Wednesday CS 121.
String Methods Programming Guides.
Open Source Server Side Scripting MySQL Functions
Chapter 10 Selected Single-Row Functions Oracle 10g: SQL
Built-in Functions. Usage of Wildcards
VB Script 9/11/2018 VB Scripting.
4. Functions and Control Statements
SQL Text Manipulation Farrokh Alemi, Ph.D.
Date Functions Farrokh Alemi, Ph.D.
Sub Procedures and Functions
Prepared By: Deborah Becker
Topics Basic String Operations String Slicing
MapInfo SQL String Functions
Lecture 5 SQL FUNCTIONS.
Topics Basic String Operations String Slicing
Internal Functions.
Geometry Section 7.7.
REACH Computer Resource Center
Topics Basic String Operations String Slicing
Introduction to SQL Server and the Structure Query Language
Presentation transcript:

VBScript Session 10

What we learn last session? Conversion Functions. Data Verification Functions.

Subjects for session 10 VBScript string manipulation. VBScript string math. VBScript date manipulation. VBScript Formatting Strings.

VBScript string manipulation InStr - Returns the position of the first occurrence of one string within another. InStrRev - Returns the position of an occurrence of one string within another, from the end of string. Len - Returns the number of characters in a string or the number of bytes required to store a variable. LCase - Returns a string that has been converted to lowercase. UCase - Returns a string that has been converted to uppercase. Replace - Returns a string in which a specified substring has been replaced with another substring a specified number of times. Space - Returns a string consisting of the specified number of spaces. String – Returns a repeating character string of the length specified. StrReverse – Returns a string in which the character order of a specified string is reversed. Trim, LTrim, RTrim - Returns a copy of a string without leading, trailing, or both leading and trailing spaces.

VBScript string manipulation Left - Returns a specified number of characters from the left side of a string. Right - Returns a specified number of characters from the right side of a string. Mid - Returns a specified number of characters from a string. Join - Returns a string created by joining a number of substrings contained in an array. Split - Returns a zero-based, one-dimensional array containing a specified number of substrings. StrComp - Returns a value indicating the result of a string comparison. Filter - Returns a zero-based array containing a subset of a string array based on a specified filter criteria.

VBScript math manipulation Abs - Returns the absolute value of a number. Atn - Returns the arctangent of a number. Cos - Returns the cosine of an angle. Exp - Returns e (the base of natural logarithms) raised to a power. Log - Returns the natural logarithm of a number. Sin - Returns the sine of an angle. Tan - Returns the tangent of an angle. Rnd - Returns a random number. Round - Returns a number rounded to a specified number of decimal places. Sgn - Returns an integer indicating the sign of a number. Int, Fix - Returns the integer portion of a number

VBScript date manipulation Date - Returns the current system date. Time - Returns a Variant of subtype Date indicating the current system time. Day - Returns a whole number between 1 and 31, inclusive, representing the day of the month. Month - Returns a whole number between 1 and 12, inclusive, representing the month of the year. MonthName - Returns a string indicating the specified month. WeekDay - Returns a whole number representing the day of the week. WeekDayName - Returns a string indicating the specified day of the week. Year - Returns a whole number representing the year.

VBScript date manipulation Hour - Returns a whole number between 0 and 23, inclusive, representing the hour of the day. Minute - Returns a whole number between 0 and 59, inclusive, representing the minute of the hour. Second - Returns a whole number between 0 and 59, inclusive, representing the second of the minute. Now - Returns the current date and time according to the setting of your computer's system date and time.

VBScript date manipulation DateAdd - Returns a date to which a specified time interval has been added. DateDiff - Returns the number of intervals between two dates. DatePart - Returns the specified part of a given date. DateSerial - Returns a Variant of subtype Date for a specified year, month, and day. DateValue - Returns a Variant of subtype Date. TimeSerial - Returns a Variant of subtype Date containing the time for a specific hour, minute, and second. TimeValue - Returns a Variant of subtype Date containing the time. Timer - Returns the number of seconds that have elapsed since 12:00 AM (midnight).

VBScript Formatting Strings. FormatCurrency - Returns an expression formatted as a currency value using the currency symbol defined in the system control panel. FormatDateTime - Returns an expression formatted as a date or time. FormatNumber - Returns an expression formatted as a number. FormatPercent - Returns an expression formatted as a percentage (multiplied by 100) with a trailing % character.

Make sure to visit us Tutorials Articles Proikects And much more www.AdvancedQTP.com