Click here to Skip to main content
15,561,125 members
Home / Discussions / C#
   

C#

 
GeneralRe: Sense of making my own Timestamp class? Pin
Dave Kreskowiak4-Feb-14 14:42
mveDave Kreskowiak4-Feb-14 14:42 
AnswerRe: Sense of making my own Timestamp class? Pin
BillWoodruff4-Feb-14 4:56
professionalBillWoodruff4-Feb-14 4:56 
GeneralRe: Sense of making my own Timestamp class? Pin
Marco Bertschi4-Feb-14 5:03
professionalMarco Bertschi4-Feb-14 5:03 
AnswerRe: Sense of making my own Timestamp class? Pin
jschell4-Feb-14 14:20
jschell4-Feb-14 14:20 
GeneralRe: Sense of making my own Timestamp class? Pin
Marco Bertschi4-Feb-14 21:07
professionalMarco Bertschi4-Feb-14 21:07 
AnswerRe: Sense of making my own Timestamp class? Pin
TnTinMn6-Feb-14 13:37
TnTinMn6-Feb-14 13:37 
GeneralRe: Sense of making my own Timestamp class? Pin
Marco Bertschi6-Feb-14 22:12
professionalMarco Bertschi6-Feb-14 22:12 
GeneralRe: Sense of making my own Timestamp class? Pin
TnTinMn9-Feb-14 11:29
TnTinMn9-Feb-14 11: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 20:56
professionalMarco Bertschi9-Feb-14 20:56 
GeneralRe: Sense of making my own Timestamp class? Pin
TnTinMn10-Feb-14 14:12
TnTinMn10-Feb-14 14:12 
QuestionSSIS for Fixed Length line Pin
nitin_ion3-Feb-14 21:26
nitin_ion3-Feb-14 21:26 
AnswerRe: SSIS for Fixed Length line Pin
Bernhard Hiller3-Feb-14 21:52
Bernhard Hiller3-Feb-14 21:52 
GeneralRe: SSIS for Fixed Length line Pin
Marco Bertschi3-Feb-14 21:56
professionalMarco Bertschi3-Feb-14 21:56 
GeneralRe: SSIS for Fixed Length line Pin
nitin_ion3-Feb-14 22:46
nitin_ion3-Feb-14 22: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 20:00
Member 102487683-Feb-14 20: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 22:53
mveRichard MacCutchan3-Feb-14 22:53 
QuestionNorth wind Database Pin
Sandhya Bandar3-Feb-14 10:46
Sandhya Bandar3-Feb-14 10:46 
AnswerRe: North wind Database Pin
Kornfeld Eliyahu Peter3-Feb-14 10:54
professionalKornfeld Eliyahu Peter3-Feb-14 10:54 
AnswerRe: North wind Database Pin
Dave Kreskowiak3-Feb-14 13:49
mveDave Kreskowiak3-Feb-14 13:49 
JokeRe: North wind Database Pin
Kornfeld Eliyahu Peter3-Feb-14 21:19
professionalKornfeld Eliyahu Peter3-Feb-14 21:19 
AnswerRe: North wind Database Pin
Marco Bertschi3-Feb-14 22:04
professionalMarco Bertschi3-Feb-14 22:04 
QuestionWorking with Bitmaps Pin
BBatts3-Feb-14 8:45
BBatts3-Feb-14 8:45 
AnswerRe: Working with Bitmaps Pin
TnTinMn4-Feb-14 7:56
TnTinMn4-Feb-14 7:56 
QuestionProject Question Pin
reaper21913-Feb-14 6:15
reaper21913-Feb-14 6:15 
AnswerRe: Project Question Pin
Alan Balkany3-Feb-14 6:20
Alan Balkany3-Feb-14 6: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.