troubleshooting Question

computed columns in gridview / sql server

Avatar of TonyReba
TonyRebaFlag for United States of America asked on
Microsoft SQL ServerC#ASP.NET
20 Comments1 Solution899 ViewsLast Modified:
Hi EE,

I am wondering if someone can help on the following issue, I have a sql database in table containing three nvarchar variables,  the reason i am using nvarchar is because the server instance i am using is sql server 2000 which has no separate field for date and time, so I stick to use nvarchar to input the:

Sign in Time
Registration Start
Registration End

Now I need two more columns that need to calculate

Wait Time  = Reg Start - Sign In Time
Total Registration time  = Reg End - Re Start

As you can see the issue relies on the data types, is there a workaround to this?
Can I Convert the data types on the code page to a time column and perform the substractions?
Meabe in Sql server?

Ultimate the goal is to self auto-compute this columns so I can represent in a GridView

Please advise, thanks in advance

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 20 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 20 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros