You are on page 1of 3

Dim StrDate

Dim actualDate
Dim StrTime
Dim actualTime
StrDate = "October 19, 1962" ' Define date.
actualDate = CDate(StrDate) ' Convert to Date data type.
print actualDate
StrTime = "4:35:47 PM" ' Define time.
actualTime = CDate(StrTime) ' Convert to Date data type.
print actualTime
'All powers within you, you can do it
'Dim objWMIService
'Dim colTimeZone
'Dim objTimeZone
'Set objWMIService = GetObject("winmgmts:" &
'"{impersonationLevel=impersonate}!\\.\root\cimv2")
'Set colTimeZone = objWMIService.ExecQuery("Select * from Win32_TimeZone")
'For Each objItem in colTimeZone
'print "Bias: " & objItem.Bias
'print "Caption: " & objItem.Caption
'print "Daylight Bias: " & objItem.DaylightBias
'print "Daylight Day: " & objItem.DaylightDay
'print "Daylight Day Of Week: " & objItem.DaylightDayOfWeek
'print "Daylight Hour: " & objItem.DaylightHour
'print "Daylight Millisecond: " & objItem.DaylightMillisecond
'print "Daylight Minute: " & objItem.DaylightMinute
'print "Daylight Month: " & objItem.DaylightMonth
'print "Daylight Name: " & objItem.DaylightName
'print "Daylight Second: " & objItem.DaylightSecond
'print "Daylight Year: " & objItem.DaylightYear
'print "Description: " & objItem.Description
'print "Setting ID: " & objItem.SettingID
'print "Standard Bias: " & objItem.StandardBias
'print "Standard Day: " & objItem.StandardDay
'print "Standard Day Of Week: " & objItem.StandardDayOfWeek
'print "Standard Hour: " & objItem.StandardHour
'print "Standard Millisecond: " & objItem.StandardMillisecond
'print "Standard Minute: " & objItem.StandardMinute
'print "Standard Month: " & objItem.StandardMonth
'print "Standard Name: " & objItem.StandardName
'print "Standard Second: " & objItem.StandardSecond
'print "Standard Year: " & objItem.StandardYear
'Next
'
'
'
''
''Dim oArray
''Dim oCounter1
''Dim oCounter2
''Dim tmp
''oArray=array(8,3,4,2,7,1,6,9,5,0)
''For oCounter1=lbound(oArray) to ubound(oArray)
''For oCounter2=lbound(oArray) to ubound(oArray)-1
''If oArray(oCounter2)>oArray(oCounter2+1) Then
''tmp=oArray(oCounter2)
''oArray(oCounter2)=oArray(oCounter2+1)
''oArray(oCounter2+1)=tmp
''End If
''Next
''Next
''For oCounter1=lbound(oArray) to ubound(oArray)
''print oArray(oCounter1)
''Next
''
''
''
'''Function demo_parameters (byref x, byval y)
'''x=30
'''y=50
'''demo_parameters=x+y
'''End Function
'''a=10
'''b=20
'''msgbox demo_parameters (a, b)
'''msgbox a
'''msgbox b
'''
'''
'''
''''
''''
''''Redim preserve x(2)
''''x(0)="how"
''''x(1)="are"
''''x(2)="you"
''''Redim preserve x(3)
''''x(3)=123
''''
''''
''''
''''
''''
''''
''''
''''
'''''
'''''
'''''
'''''Dim FSO
'''''Set FSO = CreateObject ("Scripting.FileSystemObject")
'''''Set file = FSO.CreateTextfile ("C:\Abhi.html",True)
'''''file.Write "<I><B>Step 1</B></I>. Launch www.mywebsite.com"
'''''file.Write "<P><B>Step 2</B>. Click on the Login link"
'''''file.Write "<P><B>Step 3</B>. Enter the username kanak"
'''''file.Write "<P><B>Step 4</B>. Enter password as kanak"
'''''file.Write "<P><B>Step 5</B>. Click on the Login button"
'''''file.Write "<P><B><I>Step 6</I></B>. Close the browser"
'''''file.close
''''
''''
''''
'''''a
'''''rexpr = "H."
'''''MainString="Hi How Are You"
'''''
'''''Set SampleRegExp = New RegExp
'''''
'''''SampleRegExp.Pattern = rexpr
'''''Set Matches = SampleRegExp.Execute(MainString)
'''''
'''''For Each Match in Matches
''''' Msgbox Match.FirstIndex
''''' Msgbox Match.Value
'''''
'''''Next
'''''
''''''
''''''Dim a,b,c
''''''a = 100
''''''b = 200
''''''c = a + b
''''''msgbox c
''''''msgbox "Hello"
''''''
'''''''Call hyderabad
''''''x = 35
''''''y = 67
''''''z = x*y
''''''msgbox z
''''''
''''''
''''''msgbox "Bye Bye"
''''''
''''''Function hyderabad
''''''
''''''msgbox ("called hyderabad")
''''''hyderabad = True
''''''
''''''End Function
''''''
''''''
'''''
'''''
'''''
''''
''''
''''
''''
''''
''''
''''
''''
''''
'''
'''
'''
''
''
'
'