Click here to Skip to main content
15,878,430 members
Please Sign up or sign in to vote.
1.00/5 (1 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 ...
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?
Nawab Ahmad 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.
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.

req.Open "GET", "" & starting_date & "&endingDate=" & ending_date, False 
Share this answer
Prasad Khandekar 19-Jul-13 11:59am    
My 5+.
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) 


Share this answer

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

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900