c# DateTime convert to string -


i have result set times stored in datetime variables. if value null want set var string "still logged in".

i've tried tostring() things had no luck yet.

this code doesn't work. queryresult.egresstime type datetime , can't string.

if (convert.isdbnull(rdr["timeout"]))                 {                     queryresult.egresstime = "still logged in";                 } 

that seems flaw in design if absolutely must keep this, set precise date ridiculously far in past , check before rendering date render "still logged in" if it's particular date. terrible way design things though!


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -