Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
|
Lista Forumurilor Pe Tematici
|
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login
POZE MRRRR'S FORUM (VIEW ONLY)
Nu sunteti logat.
|
Nou pe simpatie: GeorgianaIoana 25 ani
 | Femeie 25 ani Bucuresti cauta Barbat 25 - 63 ani |
|
Mrrrr
AdMiN
 Inregistrat: acum 18 ani
Postari: 2247
|
|
' Just copy/paste this in notepad, save as VBS and run to test:
' declare variables Dim strDateStart Dim strDateEnd
' ask for values via InputBox strDateStart = InputBox("Please enter start date (format is dd.mm.yyyy):") strDateEnd = InputBox("Please enter end date (format is dd.mm.yyyy):")
' if either of them is null or 0, end If strDateStart = 0 Or strDateEnd = 0 Then MsgBox "You didn't enter start date or end date" Set session = Nothing WScript.Quit End If
' the 2 lines below are from a SAP session VBS but show how the 2 date variables are used 'session.findById("wnd[0]/usr/ctxtBUDAT-LOW").text = strDateStart 'session.findById("wnd[0]/usr/ctxtBUDAT-HIGH").text = strDateEnd
'Set session = Nothing |
_______________________________________

|
|
pus acum 5 ani |
|
Mrrrr
AdMiN
 Inregistrat: acum 18 ani
Postari: 2247
|
|
Condition if input is date or not:
' declare variables Dim strDateStart Dim strDateEnd
' if InputBox doesn't contain date, script will end strDateStart = InputBox("Please enter start date (format is dd.mm.yyyy):", "Date") If Not isDate(strDateStart) Then MsgBox "Date wasn't entered in the correct format dd.mm.yyyy - exiting..." WScript.Quit Else
strDateEnd = InputBox("Please enter end date (format is dd.mm.yyyy):", "Date") If Not isDate(strDateEnd) Then MsgBox "Date wasn't entered in the correct format dd.mm.yyyy - exiting..." WScript.Quit Else MsgBox strDateStart & " - " & strDateEnd End If End If |
_______________________________________

|
|
pus acum 5 ani |
|