CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 Calculating Total Time

Print topic Send  topic

Author Message
Don_S

Posts: 50
Posted: 11/28/2005, 7:45 AM

I have to fields, "Start_Time" and "End_Time". I need to have a calculated field "Total_Time" which would be "End_Time"-"Start_Time" should the code to do the calculation be put into the After_Update event of the "End_Time" field? and how should the code be written? These are all datetime fields in a SQL DB. Can CodeCharge do the math with it being in time format?

Thanks,
Don
View profile  Send private message
eiden


Posts: 34
Posted: 12/01/2005, 8:17 AM

VBScript has the DateDiff function that you can use to calculate this with.

You can read about it here: http://www.w3schools.com/vbscript/func_datediff.asp




Recommended reading:
http://www.w3schools.com/vbscript/vbscript_ref_functions.asp
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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