CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 JavaScript conversion for date

Print topic Send  topic

Author Message
deagon

Posts: 31
Posted: 07/12/2007, 1:47 PM

I'm using CodeCharge 3.1 .ASP and I'm trying to use a established date field off a SQL database 7/1/2007 format. I use a listbox called DaySelect1 that has Integer values 1 through 30. When running my JobStorage1 form I'm seeing a date all ready provided in the SalesRelease field and then select the listbox and pick a number from 1 through 30, this gives me the number of days to add to the SalesRelease and then with JavaScript adds it and puts the Result in the EngPriorityDate field. It works but the formating is all wrong and the counting is messed up.

How does one convert the data to the ShortDate like the SQL database instead of the Fri Jul 13 00:00:00 PDT 2007 format? See my JavaScript code below. The code works its just the format is wrong and the number gets way off the larger the number selected.

var myDate = new Date(JobStorage1.SalesRelease.value);
myDate.setDate(myDate.getDate() + JobStorage1.DaySelect1.value); JobStorage1.EngPriorityDate.value = myDate;

Please help this is driving me crazy.

Is there another way to do this in code charge
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.