Click here to Skip to main content
15,913,242 members
Home / Discussions / C#
   

C#

 
AnswerRe: Using C#, how can I log into a website and click Continue Pin
Gavin Roberts19-Mar-12 1:41
Gavin Roberts19-Mar-12 1:41 
AnswerRe: Using C#, how can I log into a website and click Continue Pin
harold aptroot19-Mar-12 2:20
harold aptroot19-Mar-12 2:20 
Questioni need c# codes to solve the problem.. Pin
pankaj308618-Mar-12 9:20
pankaj308618-Mar-12 9:20 
AnswerRe: i need c# codes to solve the problem.. Pin
OriginalGriff18-Mar-12 9:30
mveOriginalGriff18-Mar-12 9:30 
AnswerRe: i need c# codes to solve the problem.. Pin
PIEBALDconsult18-Mar-12 16:03
mvePIEBALDconsult18-Mar-12 16:03 
AnswerRe: i need c# codes to solve the problem.. Pin
Prasad_Kulkarni18-Mar-12 19:03
Prasad_Kulkarni18-Mar-12 19:03 
AnswerRe: i need c# codes to solve the problem.. Pin
Abhinav S18-Mar-12 19:57
Abhinav S18-Mar-12 19:57 
Questionrestoring database using c# Pin
altafmohd18-Mar-12 2:52
altafmohd18-Mar-12 2:52 
AnswerRe: restoring database using c# Pin
Ravi Bhavnani18-Mar-12 3:08
professionalRavi Bhavnani18-Mar-12 3:08 
GeneralRe: restoring database using c# Pin
altafmohd18-Mar-12 3:39
altafmohd18-Mar-12 3:39 
GeneralRe: restoring database using c# Pin
Ravi Bhavnani18-Mar-12 4:06
professionalRavi Bhavnani18-Mar-12 4:06 
GeneralRe: restoring database using c# Pin
altafmohd18-Mar-12 4:50
altafmohd18-Mar-12 4:50 
GeneralRe: restoring database using c# Pin
Ravi Bhavnani18-Mar-12 5:10
professionalRavi Bhavnani18-Mar-12 5:10 
GeneralRe: restoring database using c# Pin
altafmohd18-Mar-12 5:21
altafmohd18-Mar-12 5:21 
AnswerRe: restoring database using c# Pin
Ravi Bhavnani18-Mar-12 5:29
professionalRavi Bhavnani18-Mar-12 5:29 
GeneralRe: restoring database using c# Pin
Wes Aday18-Mar-12 5:43
professionalWes Aday18-Mar-12 5:43 
GeneralRe: restoring database using c# Pin
Ravi Bhavnani18-Mar-12 5:49
professionalRavi Bhavnani18-Mar-12 5:49 
GeneralRe: restoring database using c# Pin
altafmohd18-Mar-12 6:34
altafmohd18-Mar-12 6:34 
GeneralRe: restoring database using c# Pin
Ravi Bhavnani18-Mar-12 6:37
professionalRavi Bhavnani18-Mar-12 6:37 
GeneralRe: restoring database using c# Pin
altafmohd18-Mar-12 7:01
altafmohd18-Mar-12 7:01 
AnswerMessage Removed Pin
19-Mar-12 0:32
Vipin_Arora19-Mar-12 0:32 
GeneralRe: restoring database using c# Pin
altafmohd19-Mar-12 0:49
altafmohd19-Mar-12 0:49 
QuestionProgramming RFID in c#.net Pin
yutalolap18-Mar-12 0:38
yutalolap18-Mar-12 0:38 
AnswerRe: Programming RFID in c#.net Pin
Richard MacCutchan18-Mar-12 2:17
mveRichard MacCutchan18-Mar-12 2:17 
QuestionGetting the date from a timespan Pin
CCodeNewbie17-Mar-12 14:37
CCodeNewbie17-Mar-12 14:37 
Hi,

I am trying to get a date in the format dd/MM/yyyy HH:mm:ss from a datetime.addseconds operation but everything that is returned (unless I tickcount - which tells me the elapsed time) is wrong, i.e. 1601,1,1,0,0,0.

While I 'understand' why I get that response I don't know how to fix it.

Code:
C#
long st = procs.StartTime.ToFileTime();
DateTime stDt = new DateTime(1601, 1, 1, 0, 0, 0).AddSeconds(st);


If I do this
C#
string stime = String.Empty;
stime += (Environment.TickCount / 86400000).ToString() + "d";
stime += (Environment.TickCount / 3600000 % 24) + "h";
stime += (Environment.TickCount / 120000 % 60) + "m";
stime += (Environment.TickCount / 1000 % 60) + "s";

I get 7d10h17m44s.

How do I get the difference between datetime.now and that process startdate expressed in the desired format or how do I convert 7d10h17m44s into a usable format so that I can deduct it from datetime.now?

Thanks for your time.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.