473,382 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Can anyone help me convert VBscript to Javascript

I'm trying to convert my VB Script to a Javascript. This is very important to me because VB script is not supported anymore. Please can someone help me?

Expand|Select|Wrap|Line Numbers
  1. <script language=VBSCRIPT> <!--
  2.       function geturl(nRep)
  3.       dim url
  4.       dim sFrom
  5.       dim sTo
  6.       sFrom = year(date()-7) & "-" & right("00" & month(date()-7),2) & "-" & right("00" & day(date()-7),2)
  7.       sTo = year(date()) & "-" & right("00" & month(date()),2) & "-" & right("00" & day(date()),2)
  8.        select case nRep
  9.        case 1
  10.              url = "" & sFrom & "&DateStartEnd_To=" & sTo
  11.        case 2
  12.              url = "URL" & sFrom & "&DateStartEnd_To=" & sTo
  13.        case 3
  14.              url = "URL" & sFrom & "&DateStartEnd_To=" & sTo
  15.        end select
  16.        geturl = url
  17.       end function
  18.      --> </script>
May 17 '16 #1
1 1604
Dormilich
8,658 Expert Mod 8TB
can you explain what this script is supposed to do?
May 18 '16 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: CJ | last post by:
Hi I'm trying to send email via a c# app, and I've come across various ways to do it, but the way that seems best given my constraints is this little vbscript: Dim theApp, theNameSpace,...
6
by: Allen | last post by:
I can't figure this out. Can anyone convert this to VB? byte * p = (byte *)(void *)Scan0;
1
by: Lou Civitella | last post by:
I have found code that Recycles the Application Pool but it was written in VBScript can anyone convert this for me to VB.Net? Thanks! 'Appendix B: Application Pool Recycle script - Save as...
10
by: Shadow Lynx | last post by:
That subject packs a whallop, so let me explain in better detail what's happening and how it relates to ASPX pages... In a nutshell, if the first <script /on a page is of type "text/vbscript",...
2
by: LostnCode | last post by:
Hi, Can anyone help, I need to convert his code from vbscript to sharp C# for use with ASP.Net2.0? This is my first time using a forum. I don't know anything about either coding language so...
0
by: pyar | last post by:
Hi guys, I am trying since so long to resolve my query as how to convert VBScript to DLL(.NET DLL).I browsed thru net but no use.So please could anyone of you guys help me out by giving a sample...
1
by: pyar | last post by:
Hi guys, I am trying since so long to resolve my query as how to Convert VBScript to DLL(.NET DLL).I browsed thru net but no use.So please could anyone of you guys help me out by giving a sample...
3
by: ArvindDharwal | last post by:
What is the Microsoft tool or any other tool to convert the JavaScript file to .dll?
20
BHo15
by: BHo15 | last post by:
Hi. I'm neither accomplished at vb.net or vbscript, but have been fooling with both of them as of late. I have a vb.net GUI that calls 2 vbscripts, and I would like to cut it down to just one (my...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.