|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Time formatting is strangeAnyone got a clue to why ther is a T between date and time in the
"formatted for sorting" or whatewer they call it, and a Z at the end after seconds- got it fixed for my cobol programmer by formatting it with yyyy ... aso, made the mistake with mm and MM but got it befre someone saw) but really think its strange, excel dosent like that format either. M$ not m$ compatible? Not a problem for me at the moment, just itrested if im missing somethng useful. //CY christ***@gmail.com wrote:
> Anyone got a clue to why ther is a T between date and time in the If the format is for sorting, then it is for sorting, nothing else. It > "formatted for sorting" or whatewer they call it, and a Z at the end > after seconds- got it fixed for my cobol programmer by formatting it > with yyyy ... aso, made the mistake with mm and MM but got it befre > someone saw) but really think its strange, excel dosent like that > format either. M$ not m$ compatible? > > Not a problem for me at the moment, just itrested if im missing > somethng useful. > > //CY doesn't have to be compatible with anything other than other values in the same format. The format you saw included T for time and Z for zone information. If you need to create a string that Excel understands as a Date/Time value, pick a format that Excel understands and format for it using the ToString method and providing a list of format codes like the mm and MM you've discovered. An lastly, it's spelled Microsoft, not M$.
Show quote
"Lasse Vågsæther Karlsen" <la***@vkarlsen.no> wrote in message Actually, the MS formatting strings for date/time values are inconsistent. news:%23h3qll5LIHA.5208@TK2MSFTNGP04.phx.gbl... > christ***@gmail.com wrote: >> Anyone got a clue to why ther is a T between date and time in the >> "formatted for sorting" or whatewer they call it, and a Z at the end >> after seconds- got it fixed for my cobol programmer by formatting it >> with yyyy ... aso, made the mistake with mm and MM but got it befre >> someone saw) but really think its strange, excel dosent like that >> format either. M$ not m$ compatible? >> >> Not a problem for me at the moment, just itrested if im missing >> somethng useful. >> >> //CY > > If the format is for sorting, then it is for sorting, nothing else. It > doesn't have to be compatible with anything other than other values in the > same format. > > The format you saw included T for time and Z for zone information. > > If you need to create a string that Excel understands as a Date/Time > value, pick a format that Excel understands and format for it using the > ToString method and providing a list of format codes like the mm and MM > you've discovered. > > An lastly, it's spelled Microsoft, not M$. > > -- > Lasse Vågsæther Karlsen > mailto:la***@vkarlsen.no > http://presentationmode.blogspot.com/ > Classic VB (and its derivatives such as VBA for Applications) use different formatting rules than .NET languages. Mike. "Lasse VÃ¥gsæther Karlsen" wrote: "M$" is a popular and widely-accepted abbreviation for "Microsoft". Something >> An lastly, it's spelled Microsoft, not M$. to do with Bill Gates not being a pauper, I suspect. Perhaps M$ should embrace the colloquialism. -- Lew Lew wrote:
> "Lasse Vågsæther Karlsen" wrote: Not that widely accepted.>>> An lastly, it's spelled Microsoft, not M$. > > "M$" is a popular and widely-accepted abbreviation for "Microsoft". It is quite widely accepted among 20 year old students who think they are so cool because they use Linux. It is very rarely used among professionals (for rather obvious reasons). Arne christ***@gmail.com wrote:
> Anyone got a clue to why ther is a T between date and time in the I don't get the Z at the end.> "formatted for sorting" or whatewer they call it, and a Z at the end > after seconds- got it fixed for my cobol programmer by formatting it > with yyyy ... aso, made the mistake with mm and MM but got it befre > someone saw) but really think its strange, excel dosent like that > format either. M$ not m$ compatible? I do get the T. The T is as specified in the ISO 8601 standard. It is not a super popular format but it is a well known format. I don't know why ISO chose the T instead of a space, but a guess would be that it is easier to parse when the combined datetime is a single "word". Since ASCII sort actually works like a true datetime sort for this format then it was obvious to use it for s formatting. Arne > I don't get the Z at the end. Well, thought it was some new standard, im getting it (T/Z), looks> > > Arne like a combo of s and u in formatting , but in the examples on internet I shouldnt be getting T, or just Z, well got past that. And NO, Im not 20 year *NIX guru, but 40/OpenVMS trying to get some M$ running GW for an RFID readen on train wagons in the middle to talk to my "real" system GW and then onwards to an ZOS running AROS app for your info. To get things working, I try to figure out why they do like they do - and if they will change this behaviour next upgrade of some dll file ilke mdac has or any other M$ fundamentals like subst the common control dll to english comdlg32 if im not really misstaken / was nnot this called the dll-hell by one on my chat mates/ hmm. //CY > I don't get the Z at the end. The Z is also specified is ISO 8601. It stands for Zulu and refers to> > I do get the T. > > The T is as specified in the ISO 8601 standard. UTC. If a time is not in UTC, then another time zone is specified by replacing the Z with a time-zone offset. 2007-11-27T20:49:00Z is the same time as 2007-11-27T15:49:00-05:00 See http://en.wikipedia.org/wiki/ISO_8601 for more information. |
|||||||||||||||||||||||