Click here to Skip to main content
15,885,906 members
Home / Discussions / C#
   

C#

 
GeneralRe: Getting the date from a timespan Pin
BobJanova19-Mar-12 6:37
BobJanova19-Mar-12 6:37 
GeneralRe: Getting the date from a timespan Pin
CCodeNewbie19-Mar-12 6:59
CCodeNewbie19-Mar-12 6:59 
GeneralRe: Getting the date from a timespan Pin
CCodeNewbie19-Mar-12 12:18
CCodeNewbie19-Mar-12 12:18 
GeneralRe: Getting the date from a timespan Pin
CCodeNewbie18-Mar-12 8:24
CCodeNewbie18-Mar-12 8:24 
GeneralSince I can't reply to Luc's message Pin
CCodeNewbie18-Mar-12 10:00
CCodeNewbie18-Mar-12 10:00 
AnswerRe: Since I can't reply to Luc's message Pin
Ravi Bhavnani18-Mar-12 18:03
professionalRavi Bhavnani18-Mar-12 18:03 
AnswerRe: Getting the date from a timespan Pin
Alan N19-Mar-12 2:58
Alan N19-Mar-12 2:58 
GeneralRe: Getting the date from a timespan Pin
CCodeNewbie19-Mar-12 3:06
CCodeNewbie19-Mar-12 3:06 
Hi Alan,

I am aware of the unix epoch time value for Window's "System" process starttime but I have to disagree that it is 01/01/1601, that is just what it reports.

As I posted in my original question, if you 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";

you can get the amount of time that the process has been running. From that, a better coder than I could deduce the starttime by somehow converting the resultant stime string to a datetime then subtracting it from datetime.now.
GeneralRe: Getting the date from a timespan Pin
Alan N19-Mar-12 3:54
Alan N19-Mar-12 3:54 
GeneralRe: Getting the date from a timespan Pin
CCodeNewbie19-Mar-12 4:23
CCodeNewbie19-Mar-12 4:23 
GeneralRe: Getting the date from a timespan Pin
BobJanova19-Mar-12 3:56
BobJanova19-Mar-12 3:56 
GeneralRe: Getting the date from a timespan Pin
Alan N19-Mar-12 4:26
Alan N19-Mar-12 4:26 
GeneralBind Multi dimension array with datagrid Pin
Dhira Kumar17-Mar-12 0:23
Dhira Kumar17-Mar-12 0:23 
GeneralRe: Bind Multi dimension array with datagrid Pin
Richard MacCutchan17-Mar-12 1:37
mveRichard MacCutchan17-Mar-12 1:37 
AnswerRe: Bind Multi dimension array with datagrid Pin
Dean Oliver18-Mar-12 19:50
Dean Oliver18-Mar-12 19:50 
QuestionC# Programming Pin
Member 873573616-Mar-12 19:33
Member 873573616-Mar-12 19:33 
AnswerRe: C# Programming Pin
Richard MacCutchan16-Mar-12 22:26
mveRichard MacCutchan16-Mar-12 22:26 
GeneralRe: C# Programming Pin
Member 873573617-Mar-12 5:10
Member 873573617-Mar-12 5:10 
GeneralRe: C# Programming Pin
Richard MacCutchan17-Mar-12 5:42
mveRichard MacCutchan17-Mar-12 5:42 
GeneralRe: C# Programming Pin
Wes Aday17-Mar-12 5:56
professionalWes Aday17-Mar-12 5:56 
GeneralRe: C# Programming Pin
Dave Kreskowiak17-Mar-12 8:23
mveDave Kreskowiak17-Mar-12 8:23 
AnswerRe: C# Programming Pin
jschell17-Mar-12 7:54
jschell17-Mar-12 7:54 
Questioni need your help in ado.net Pin
mrx10016-Mar-12 13:10
mrx10016-Mar-12 13:10 
AnswerRe: i need your help in ado.net Pin
Richard Andrew x6416-Mar-12 13:13
professionalRichard Andrew x6416-Mar-12 13:13 
GeneralRe: i need your help in ado.net Pin
mrx10016-Mar-12 13:23
mrx10016-Mar-12 13:23 

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.