c# - Convert datetime ticks(String.Format("{0:D19}", DateTime.MaxValue.Ticks - DateTime.UtcNow.Ticks) to datetime -


i storing azure table storage rowkey in date time ticks format

string.format("{0:d19}", datetime.maxvalue.ticks - datetime.utcnow.ticks); 

and want convert date time.

if doing:

string str = string.format("{0:d19}", datetime.maxvalue.ticks - datetime.utcnow.ticks); 

then have that

// str = max - 

so

// = max - str 

so

datetime = new datetime(datetime.maxvalue.ticks - long.parse(str), datetimekind.utc); 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -