@
Repeater
Nah, he gave you
two examples, and —even if one was incorrect— it is more than enough to design something that will match the input.
The common convention in datetime formats is to use MM for month and mm for minute. Not knowing that is no crime, of course. "nn" was far more confusing than just using "mm" twice, though. |
No, “nn” is
far more common —and standard across languages— than what you suggest. I suspect it is because it was introduced by
Borland about thirty years ago.
http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/System__TDateTime__FormatString.html
The reality, however, is that it doesn’t matter. When presented with something you didn’t recognize your response was to become defensive instead of presuming that the OP might actually be giving you good technical information.
How come you changed : to / in the hh:mm ? |
Maybe he shouldn’t have in this specific instance; maybe it could be presented either way. You are guessing to prefer only one possibility.
Many, many date/time input routines will accept multiply-delimited objects when parsing data. Date/time handling is
much more complicated than people typically believe, and, unfortunately, varied enough that without some external information* about a string it is impossible to do better than make a guess.
*
The external information is typically forced: routines reject data that does not meet acceptable inputs. Either that or they require additional flags to select between responses, such as: Will this assume month or day comes first?
This is text interface. You've mistaken terseness for being upset. I'm more exasperated than anything; changing a specific format of string, and then asking for help parsing it effectively guarantees that any code written for the format presented won't work on the actual format. |
Exasperation is a form of upset, which you have been demonstrating. Believe it or not, text responses, while often failing to convey a lot of information present in face-to-face speech, is not totally devoid of contextual emotional markers.
I said nothing until you posted
after PhilTilson indicated his issue was happily solved to complain at him. Before that you demonstrated only minor dismay at the (lack of) information he was giving you. You even properly asked for clarifications, and formulated a decent solution using what information you had available. Good and reasonable. Until you bit back.
I’ll even admit it now, I’m being a jerk to point it out. At this point I assume OP will leave with a bit of a bitter taste no matter what. You’re usually much more relaxed. I hope everything is going well with you. (My health is not great, so I’ve been doing poorly, alas. I think it shows.)
[edit]
It is right of you to point out that representing information incorrectly (
/
vs
:
) is incongruous with useful help on a forum, though.