This topic is locked

List on load event

3/22/2007 5:39:35 PM
ASPRunnerPro General questions
G
grinningdog author

Can I add two fields as part of a list on load event? I want to fill a third field with the total (time fields again!)
Bob

Sergey Kornilov admin 3/27/2007

Bob,
unfortunately it's not clear what exactly you trying to do.
If you need to calculate a new field for each record on the list page modify SQL query on "SQL query" tab.

G
grinningdog author 3/28/2007

I've just written paragraphs explaining this - and then realised even I didn't understand it!!
I'll put something on the demo account later today and email you with a better explanation.

C
clig 3/28/2007

Can I add two fields as part of a list on load event? I want to fill a third field with the total (time fields again!)

Bob


You could easily by adding a new column by customizing the query with your calculation - Then remove that column in edit view...
eg:
"Edit SQL Query Manually"
SELECT ID, Login, Project, StartTime, EndTime, DATEDIFF(n, StartTime, EndTime) / 60 AS Hours, DATEDIFF(n, StartTime, EndTime) - DATEDIFF(n, StartTime,

EndTime) / 60 * 60 AS Minutes, CAST(DATEDIFF(n, StartTime, EndTime) / 60 AS decimal(10, 4)) + CAST(CAST(DATEDIFF(n, StartTime, EndTime)

  • DATEDIFF(n, StartTime, EndTime) / 60 * 60 AS decimal(10, 4)) / 60 AS decimal(10, 4)) AS Total, Notes

    FROM dbo.StevesTime