how to convert 7 digit number to time...?
Int i1= 2061262;
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Oct 3, 2013, 9:48 AM
is there any logic to cut it down in to time?
i.e first two digit is hours....etc like that?
And are you looking solution in c# or SQL?
VulpesPosted Oct 3, 2013, 9:36 AM
This takes the form: yyyydddd where the first 4 digits is the year and the last 3 digits represent the number of the day in that year.
If that's what it is, you can convert it to a 'normal' date as follows:
The output is:
19 September 2061
Sanjeeb LenkaPosted Oct 3, 2013, 6:11 AM
if its 6 digit try this:
int timeNumber = 204342;
DateTime time = DateTime.ParseExact(timeNumber.ToString().PadLeft(6, '0'), "HHmmss", null);