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

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

formula - R: how to pass in a reference to the variable in glm or lm? -