Click here to Skip to main content
15,867,568 members
Home / Discussions / C#
   

C#

 
GeneralRe: Sense of making my own Timestamp class? Pin
Dave Kreskowiak4-Feb-14 13:42
mveDave Kreskowiak4-Feb-14 13:42 
AnswerRe: Sense of making my own Timestamp class? Pin
BillWoodruff4-Feb-14 3:56
professionalBillWoodruff4-Feb-14 3:56 
GeneralRe: Sense of making my own Timestamp class? Pin
Marco Bertschi4-Feb-14 4:03
protectorMarco Bertschi4-Feb-14 4:03 
AnswerRe: Sense of making my own Timestamp class? Pin
jschell4-Feb-14 13:20
jschell4-Feb-14 13:20 
GeneralRe: Sense of making my own Timestamp class? Pin
Marco Bertschi4-Feb-14 20:07
protectorMarco Bertschi4-Feb-14 20:07 
AnswerRe: Sense of making my own Timestamp class? Pin
TnTinMn6-Feb-14 12:37
TnTinMn6-Feb-14 12:37 
GeneralRe: Sense of making my own Timestamp class? Pin
Marco Bertschi6-Feb-14 21:12
protectorMarco Bertschi6-Feb-14 21:12 
GeneralRe: Sense of making my own Timestamp class? Pin
TnTinMn9-Feb-14 10:29
TnTinMn9-Feb-14 10:29 
Marco,

My statement "The DateTime structure can only accommodate milliseconds (3 digits)" was incorrect. Unsure | :~ Sorry about that.
You can access higher resolution through the usage of the Ticks property that has a 100 nanosecond resolution[^].

You could use DateTime.TryParseExact with this format string: "yyyy-MM-dd\THH:mm:ss"
If that succeeds then, then you would need to extract the fractional second component (if it exists) as microseconds (upto 6 digits) and convert the microseconds to Ticks. Then you you can use the DateTime.AddTicks method on the DateTime value returned from the TryParseExact method.

I have put together a class to parse a TimeStamp string using this methodolgy and can make a copy of the code available if you are interested in it.

Yeah, its cold and I saw this as an interesting exercise. Smile | :)
GeneralRe: Sense of making my own Timestamp class? Pin
Marco Bertschi9-Feb-14 19:56
protectorMarco Bertschi9-Feb-14 19:56 
GeneralRe: Sense of making my own Timestamp class? Pin
TnTinMn10-Feb-14 13:12
TnTinMn10-Feb-14 13:12 
QuestionSSIS for Fixed Length line Pin
nitin_ion3-Feb-14 20:26
nitin_ion3-Feb-14 20:26 
AnswerRe: SSIS for Fixed Length line Pin
Bernhard Hiller3-Feb-14 20:52
Bernhard Hiller3-Feb-14 20:52 
GeneralRe: SSIS for Fixed Length line Pin
Marco Bertschi3-Feb-14 20:56
protectorMarco Bertschi3-Feb-14 20:56 
GeneralRe: SSIS for Fixed Length line Pin
nitin_ion3-Feb-14 21:46
nitin_ion3-Feb-14 21:46 
QuestionCreating barcode of type ean-13 in c# windows forms with sql server 2008 using StrokeScribe control of version 4.3.2 Pin
Member 102487683-Feb-14 19:00
Member 102487683-Feb-14 19:00 
SuggestionRe: Creating barcode of type ean-13 in c# windows forms with sql server 2008 using StrokeScribe control of version 4.3.2 Pin
Richard MacCutchan3-Feb-14 21:53
mveRichard MacCutchan3-Feb-14 21:53 
QuestionNorth wind Database Pin
Sandhya Bandar3-Feb-14 9:46
Sandhya Bandar3-Feb-14 9:46 
AnswerRe: North wind Database Pin
Kornfeld Eliyahu Peter3-Feb-14 9:54
professionalKornfeld Eliyahu Peter3-Feb-14 9:54 
AnswerRe: North wind Database Pin
Dave Kreskowiak3-Feb-14 12:49
mveDave Kreskowiak3-Feb-14 12:49 
JokeRe: North wind Database Pin
Kornfeld Eliyahu Peter3-Feb-14 20:19
professionalKornfeld Eliyahu Peter3-Feb-14 20:19 
AnswerRe: North wind Database Pin
Marco Bertschi3-Feb-14 21:04
protectorMarco Bertschi3-Feb-14 21:04 
QuestionWorking with Bitmaps Pin
BBatts3-Feb-14 7:45
BBatts3-Feb-14 7:45 
AnswerRe: Working with Bitmaps Pin
TnTinMn4-Feb-14 6:56
TnTinMn4-Feb-14 6:56 
QuestionProject Question Pin
reaper21913-Feb-14 5:15
reaper21913-Feb-14 5:15 
AnswerRe: Project Question Pin
Alan Balkany3-Feb-14 5:20
Alan Balkany3-Feb-14 5:20 

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.