Click here to Skip to main content
15,441,816 members
Home / Discussions / C#
   

C#

 
AnswerRe: Determine Distance between HD Camera and Object Pin
Gerry Schmitz15-Nov-17 5:39
mveGerry Schmitz15-Nov-17 5:39 
Questionmy projects link button not work in iphone 6s but desktop work properly why? Pin
Member 1352056914-Nov-17 2:27
MemberMember 1352056914-Nov-17 2:27 
AnswerRe: my projects link button not work in iphone 6s but desktop work properly why? Pin
Pete O'Hanlon14-Nov-17 3:37
mvaPete O'Hanlon14-Nov-17 3:37 
AnswerRe: my projects link button not work in iphone 6s but desktop work properly why? Pin
Richard Deeming14-Nov-17 3:37
mveRichard Deeming14-Nov-17 3:37 
AnswerRe: my projects link button not work in iphone 6s but desktop work properly why? Pin
Richard MacCutchan14-Nov-17 4:50
mveRichard MacCutchan14-Nov-17 4:50 
AnswerRe: my projects link button not work in iphone 6s but desktop work properly why? Pin
Gerry Schmitz15-Nov-17 5:42
mveGerry Schmitz15-Nov-17 5:42 
Questionregex Pin
arkiboys14-Nov-17 1:50
Memberarkiboys14-Nov-17 1:50 
AnswerRe: regex Pin
Richard Deeming14-Nov-17 2:08
mveRichard Deeming14-Nov-17 2:08 
Not with regular expressions! Laugh | :laugh:

Use DateTime.TryParseExact[^] to validate the string against your required format.

However, there's a small problem. Your "valid" string doesn't actually match the format you're validating against. Your format requires the letter "T" between the date and time, but neither of your strings have that.

C#
string input = "2017-09-19T08:04:31.123";

DateTime parsedDate;
bool isValid = DateTime.TryParseExact(input, 
    "yyyy-MM-ddThh:mm:ss.fff", 
    CultureInfo.InvariantCulture, 
    DateTimeStyles.AssumeUniversal, 
    out parsedDate);

/*
isValid: true
parsedDate: 2017-09-19 09:04:31.123 UTC
*/




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


AnswerRe: regex Pin
Kenneth Haugland14-Nov-17 2:09
mvaKenneth Haugland14-Nov-17 2:09 
GeneralRe: regex Pin
BillWoodruff14-Nov-17 14:43
mveBillWoodruff14-Nov-17 14:43 
GeneralRe: regex Pin
Richard Deeming16-Nov-17 7:51
mveRichard Deeming16-Nov-17 7:51 
QuestionBest machine learning AI library to assess multiple inputs with different weights (non-linear) ? Pin
Member 978298312-Nov-17 23:06
MemberMember 978298312-Nov-17 23:06 
AnswerRe: Best machine learning AI library to assess multiple inputs with different weights (non-linear) ? Pin
Gerry Schmitz13-Nov-17 4:44
mveGerry Schmitz13-Nov-17 4:44 
GeneralRe: Best machine learning AI library to assess multiple inputs with different weights (non-linear) ? Pin
Member 978298313-Nov-17 4:59
MemberMember 978298313-Nov-17 4:59 
GeneralRe: Best machine learning AI library to assess multiple inputs with different weights (non-linear) ? Pin
Gerry Schmitz13-Nov-17 5:01
mveGerry Schmitz13-Nov-17 5:01 
Questioncan't find the source of Collection was Modified Exception Pin
Alexander Kindel11-Nov-17 19:46
MemberAlexander Kindel11-Nov-17 19:46 
AnswerRe: can't find the source of Collection was Modified Exception Pin
OriginalGriff11-Nov-17 20:10
mveOriginalGriff11-Nov-17 20:10 
GeneralRe: can't find the source of Collection was Modified Exception Pin
Alexander Kindel11-Nov-17 20:14
MemberAlexander Kindel11-Nov-17 20:14 
GeneralRe: can't find the source of Collection was Modified Exception Pin
OriginalGriff11-Nov-17 20:23
mveOriginalGriff11-Nov-17 20:23 
QuestionHow to simplify my code? Pin
Member 1347915010-Nov-17 12:09
MemberMember 1347915010-Nov-17 12:09 
AnswerRe: How to simplify my code? Pin
Afzaal Ahmad Zeeshan10-Nov-17 12:26
mveAfzaal Ahmad Zeeshan10-Nov-17 12:26 
QuestionUnhandled Argument Exception error in System.Drawing.dll Pin
zs6msd8-Nov-17 0:05
Memberzs6msd8-Nov-17 0:05 
AnswerRe: Unhandled Argument Exception error in System.Drawing.dll Pin
OriginalGriff8-Nov-17 0:28
mveOriginalGriff8-Nov-17 0:28 
Questionlibrary for connecting oracle from c#form Pin
Member 135093657-Nov-17 20:04
MemberMember 135093657-Nov-17 20:04 
AnswerRe: library for connecting oracle from c#form Pin
Pete O'Hanlon7-Nov-17 21:34
mvaPete O'Hanlon7-Nov-17 21:34 

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.