Click here to Skip to main content
13,042,630 members (79,186 online)
Rate this:
Please Sign up or sign in to vote.
See more:

I am using one string to process the data ,now i want to add starting date and ending date on that string.

req.Open "GET", "", False

In this string i have to add the starting date and ending date with the formate of dd-mm-yyyy

Please help ...
Posted 18-Jul-13 18:29pm
Updated 18-Jul-13 19:20pm
Sudhakar Shinde 19-Jul-13 1:36am
What is that you tried? Tags selected are VB and JAVA.. Do you want to code in VB or java or both?
H.Brydon 19-Jul-13 1:50am
I'd also recommend against use of that timestamp format. If it is up to you, a better choice is IS 8601 ( ) which is essentially yyyy-mm-dd or similar, which will cause less confusion in an international context.
nawabahmad 19-Jul-13 2:11am
I have designed the processor(in java) which use to distribute the data between the given period of time and i am calling that servlet using vb 6.0.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

req.Open "GET", "" & starting_date & "&endingDate=" & ending_date, False 
Prasad Khandekar 19-Jul-13 11:59am
My 5+.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Hello Ahmad,

Ryan has already given the answer in which he has shown how it can be done in Visual Basic using XMLHttp object. Please see blow the equivalent java example.
DateFormat dtFmt = new SimpleDateFormat("dd-MM-yy");
String strQry = "?startingDate=" + dtFmt.format(dtFromDate) + "&endinDate=" + dtFmt.format(dtEnd);
URL aUrl = new URL("" + strQry);
URLConnection uc = aUrl.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null) 


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 19 Jul 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100