PDA

View Full Version : Subtracting date and time - javascript or asp ?



brenkster
03-16-2011, 07:42 PM
Hello,

Please, I dont understand so much about Javascript, though I have been researching to find a solution...but it hasnt been easy... so I came in here ;)

I tried in asp but did not succeed... :-(

I have 3 fields

field_time_start = 5:00
field_time_end = 7:10
field_total_time = 2:10


var_time_start = Request.Form("field_time_start")
var_time_end = Request.Form("field_time_end")

Afte pressing tab show the result 2.10 in below field... how
to do that, please?

var_total_time = Request.Form("field_total_time")

Print the result after pressing tab key showin the result..

<%=var_total_time%>

=====================================

I also have to do exactly the same to subtract two dates..

I have 3 fields

field_date_start = 10/02/2011
field_date_end = 15/02/2011
field_delayed_days = 5 <--- ( days - my result )


var_time_start = Request.Form("field_date_start")
var_time_end = Request.Form("field_date_end")

var_delayed_days = Request.Form("field_delayed_days")


Please, help me, thank you ;)