WTL + Time/Date information
-
Hi all, what can i use in WTL for handling time/date information?, ibe been using the good old SYSTEMTIME struct till now, but now i have to do some time calculations, and its a real pain to do all the convert to FILETIME, etc, etc. stuff just to substract a date from another one! Should i.... 1.- Write my own WTL MFC-CTime equivalent class? 2.- Use COleDateTime? (can i do this without having to link to MFC libs?) 3.- Is there a wonderfull time/date handling class for WTL that i dont know about? Thanks!
You could try the Boost date/time libraries...[^] You'd probably have to write functions to get to/from native Windows types, though. Stuart Dootson 'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
-
Hi all, what can i use in WTL for handling time/date information?, ibe been using the good old SYSTEMTIME struct till now, but now i have to do some time calculations, and its a real pain to do all the convert to FILETIME, etc, etc. stuff just to substract a date from another one! Should i.... 1.- Write my own WTL MFC-CTime equivalent class? 2.- Use COleDateTime? (can i do this without having to link to MFC libs?) 3.- Is there a wonderfull time/date handling class for WTL that i dont know about? Thanks!
You could consider converting to OLE Date/Time format without COleDateTime, using SystemTimeToVariantTime, which lets you then do subtraction for date/time differences. The integer part of the result is the number of days difference, and you can use VariantTimeToSystemTime to make extracting hh:mm:ss information simpler. Steve S
-
Hi all, what can i use in WTL for handling time/date information?, ibe been using the good old SYSTEMTIME struct till now, but now i have to do some time calculations, and its a real pain to do all the convert to FILETIME, etc, etc. stuff just to substract a date from another one! Should i.... 1.- Write my own WTL MFC-CTime equivalent class? 2.- Use COleDateTime? (can i do this without having to link to MFC libs?) 3.- Is there a wonderfull time/date handling class for WTL that i dont know about? Thanks!
-
Hi all, what can i use in WTL for handling time/date information?, ibe been using the good old SYSTEMTIME struct till now, but now i have to do some time calculations, and its a real pain to do all the convert to FILETIME, etc, etc. stuff just to substract a date from another one! Should i.... 1.- Write my own WTL MFC-CTime equivalent class? 2.- Use COleDateTime? (can i do this without having to link to MFC libs?) 3.- Is there a wonderfull time/date handling class for WTL that i dont know about? Thanks!
-
If you are lucky enough to get VS.NET, then you can use the classic MFC CTime class - it is now a shared ATL/MFC class (along with CString and others).
When I am king, you will be first against the wall.
Hi and thanks for your answer, i do have VS.NET, but about 1 month after buying it, i uninstalled it and went back to 6.0. why? because quite simply, IT SUCKS! :) (please note that i dont start a never ending devate on .net, this is my OWN PERSONAL OPINION, im shure many people find .net lovely) NE way, i allready wrote a pair of time classes for wtl, sort of a "port" of the MFC´s CTime & CTimeSpan classes (ill be glad to share them with anyone interested), and they work just fine. Cheers!
-
Hi and thanks for your answer, i do have VS.NET, but about 1 month after buying it, i uninstalled it and went back to 6.0. why? because quite simply, IT SUCKS! :) (please note that i dont start a never ending devate on .net, this is my OWN PERSONAL OPINION, im shure many people find .net lovely) NE way, i allready wrote a pair of time classes for wtl, sort of a "port" of the MFC´s CTime & CTimeSpan classes (ill be glad to share them with anyone interested), and they work just fine. Cheers!
-
I know the VS.NET IDE sucks AND blows but you're missing out on ATL7 which is an excellent set of classes...
and even better with WTL7 installed, despite the 'glitches' that stop it being easy to install for VS.NET 2003. Why don't MS realise what a success story WTL is, and make it an official part of the product? Is it that they're afraid no-one will use MFC, or is it self-preservation on the part of the author who realises that MS control freaks will kill the product? ;) Steve S
-
and even better with WTL7 installed, despite the 'glitches' that stop it being easy to install for VS.NET 2003. Why don't MS realise what a success story WTL is, and make it an official part of the product? Is it that they're afraid no-one will use MFC, or is it self-preservation on the part of the author who realises that MS control freaks will kill the product? ;) Steve S
I think microsoft doesnt support wtl for one reason, They dont have to! or in other words, it wont make them any more money(and thats all they care about), they know that 90% of people will continue to use the arcane, buggy, and overcomplicated MFC libs even if they dont like it because its (sadly) become the "standard" for writting windows apps, and since its what "most people use", even the people that hate MFC (like me), are sometimes FORCED to use it, i had a customer (a systems manager for a hotel in my city) that told me exacly this: "if you dont do it on MFC, then i dont want it", when i asked her why, her answer was sadly true: "because if you do it on wtl, W32, or whatever, i will have a hard time finding some one to maintain it, but if you do it on MFC, then finding someone that knows/uses MFC is not a problem". I think that microsoft should make WTL open source, its (in my opinion) a GREAT library that should continue to get supported, documented, etc.
-
I think microsoft doesnt support wtl for one reason, They dont have to! or in other words, it wont make them any more money(and thats all they care about), they know that 90% of people will continue to use the arcane, buggy, and overcomplicated MFC libs even if they dont like it because its (sadly) become the "standard" for writting windows apps, and since its what "most people use", even the people that hate MFC (like me), are sometimes FORCED to use it, i had a customer (a systems manager for a hotel in my city) that told me exacly this: "if you dont do it on MFC, then i dont want it", when i asked her why, her answer was sadly true: "because if you do it on wtl, W32, or whatever, i will have a hard time finding some one to maintain it, but if you do it on MFC, then finding someone that knows/uses MFC is not a problem". I think that microsoft should make WTL open source, its (in my opinion) a GREAT library that should continue to get supported, documented, etc.
-
Hi and thanks for your answer, i do have VS.NET, but about 1 month after buying it, i uninstalled it and went back to 6.0. why? because quite simply, IT SUCKS! :) (please note that i dont start a never ending devate on .net, this is my OWN PERSONAL OPINION, im shure many people find .net lovely) NE way, i allready wrote a pair of time classes for wtl, sort of a "port" of the MFC´s CTime & CTimeSpan classes (ill be glad to share them with anyone interested), and they work just fine. Cheers!