Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reformatting a date field

Status
Not open for further replies.

wdc58

Programmer
Feb 15, 2005
7
US
I have text boxes for the user to enter Start/Stop dates for search criteria in running a report. I want to have them enter it as mm/dd/yyyy, but I need to reformat it to yyyy/mm/dd to run the report. Below is the string I create to run the report. It works if I enter the txtStartDate and txtStopDate as yyyy/mm/dd, but I want to be able to enter it as mm/dd/yyyy

String rpt = " rpt += "?Engineering";
rpt += "&report=Engineering/EngProjects_All.jsp";
rpt += "& rpt += "&destype=cache";
rpt += "&desformat=PDF";
rpt += "&paramform=no";
rpt += "&START_DATE=" + txtStartDate.getText();
rpt += "&STOP_DATE=" + txtStopDate.getText();

What do I need to do to reformat these fields?
Thanks in advance, William
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top