• Mike Montana (unregistered)

    DATE$ is a very old "legacy" statement that was carried forward from IBMs "BASIC" language that was available in XT's ROM. The statement read and wrote directly to the CMOS's real time clock. It was a friendly way to get/set the date rather than making interupt calls.

    Backward compatibility brought the old DATE$ command through the 80s in MS-DOS's "QuickBASIC". Still useful for avoiding interrupt calls. BASIC commands still required the datatype-declarator "$" for strings.

    Backward compatibility and friendliness brought the DATE$ command into VB3. The "$" became optional, but, the spirit lived on. You could still get/set the CMOS through this friendly manner. Or you could script SENDKEYS commands to launch Control Panel and strong-arm the control panel applet to set the time/date. Or you could call the WinAPI, but, the BIOS call is gone.

    VB4 continued the DATE$ compatibility-friendliness.

    VB6 carries the tradition.

    VBA, sitting ontop of VB6 imortalizes the "interrupt macro"
     

  • Franz Kafka (unregistered) in reply to dpm
    dpm:
    Marc:
    Since the end-users had to reboot to fix their clocks, I can only assume they didn't have access to change the date through the normal control panel.

    That says a lot about Windows WTFery, right there:  the user has the ability to reboot the machine but not set the clock.  Story!

    ok
    dpm


    Unix is no different. I can reboot any unix box that I have physical access to, but I can't set the date.

    dpm:
    Dazed:

    - that it isn't called something sensible like SET_SYSTEM_DATE, or at least SETDATE;

    What do you think the command "date" does in both unix shells and DOS/Windows command line?

    ok
    dpm


    in unix, it can print out the date in local or UTC form, or it can set the date (with root privs). Speaking of unix, dd - what sort of intuitive name is that? You know why it's called dd, right? cc was already taken. Don't even get me started about makefiles.  
  • Optional (unregistered) in reply to xix

    Long form date: December 7, 1942

    == 12 7, 1942

    == 12/07/1942

    == MM/DD/YYYY

    Is long form different in Europe?

    -me

  • mat (unregistered) in reply to Optional

    In Europe, well the UK anyway, the lonog format would be

    7th December, 1942

  • (cs) in reply to Mark H
    Anonymous:
    Great submission. I am also very impressed that you tracked down that bug. Of course, it's hard to take it so seriously when I read, "nested in 5 gosubs"...The last time I used a language with a gosub construct was 5th grade when I wrote "CSH_RGST.BAS" (that's "cash register" for you noobs) for a project.

    So if I undertand this correctly, in VB a simple assignment of the form

    DATE$ = xyz

    can have a side-effect such as changing the system clock? But it also behaves like a regular assignment, putting the value of xyz into DATE$? What a crazy environment to work in. I mean you can do the same in C++ and I hear its very easy to do in .NET also, but I've never heard of it being built-in to the API.

    PS the captcha dictionary has like, maybe 10 words in it. how many times have i gotten poprocks?

    I assume the actual contents of $DATE afterwards is the system date at the time you access it - so you get back the date you put in, as long as you don't wait too long to look.

    Of course, the real WTF is that what looks like ordinary variable access has such nasty side-effects. In some ways, it's even more evil than warped use of operator overloading. Also, if I'm understanding this correctly, you can set just the date without changing the time (and presumably vice-versa) - can anyone say "race condition"?

  • chris (unregistered) in reply to xix

    as soon as y'all stop describing how much people weigh using "stones" (WTF is that, anyway?) then we can talk about the metric system.

    as for fahrenheit -- it runs from intolerably cold at 0 degrees to intolerably hot at 100. we won't be losing that for some arbitrary system based on chemistry any time soon.

  • (cs) in reply to Bus Raker
    Bus Raker:

    DigitalLogic:
    The real WTF is that there is a command to change the system date in VBA. So who can come up with a scienario where a spreadsheet, word doc, or access app needs to change the time on the local pc?

    Almost very login script sets the time programmatically to the time server, and many are written in VBScript in the windows world.

    I would also imagine it could be useful for automated testing purposes,  though everyone knows that VBA apps/tools don't go through any QA ... they are made on the fly by IT people that believe they are programmers and end up on the dailywtf.  


    Yup. VBA is fine for login scripts and such... but...

    The real WTF is that VBA was used to create an application. VBA stand for Visual Basic FOR Applications, and in this case the for does NOT mean FOR CREATING. It means TO ASSIST. Basically, it's a scripting language to add scripting functionality to an application.

    This submission doesn't surprise me the least bit. A person used VBA to create an application. The fact that they made that decision renders all other decisions they make questionable.
  • (cs) in reply to Franz Kafka
    Franz Kafka:
    dpm:
    That says a lot about Windows WTFery, right there:  the user has the ability to reboot the machine but not set the clock.  Story!


    Unix is no different. I can reboot any unix box that I have physical access to, but I can't set the date.


    Unix systems are different, in that *usually* users do _not_ have physical access to the actual computer.  Windows of course is the opposite.

    ok
    dpm
  • Unklegwar (unregistered) in reply to Ken
    Ken:

    Anonymous:
    Wouldn't it be great if an ordinary application did not have the privilege of changing the system's date? Can you dare to imagine such a revolutionary concept?

    An *ordinary* application?  What exactly entails an *ordinary* application?

    And what would do if you DID need to change the system date?  Set ExtraOrdinary = True? 



    Public Sub ChangeSystemDate(newDate as date)
        Application.Fabulous = True
        Date$ = newDate
        Application.Fabulous = False
    End Sub
  • Unklegwar (unregistered) in reply to makomk
    makomk:
    Anonymous:
    Great submission. I am also very impressed that you tracked down that bug. Of course, it's hard to take it so seriously when I read, "nested in 5 gosubs"...The last time I used a language with a gosub construct was 5th grade when I wrote "CSH_RGST.BAS" (that's "cash register" for you noobs) for a project.

    So if I undertand this correctly, in VB a simple assignment of the form

    DATE$ = xyz

    can have a side-effect such as changing the system clock? But it also behaves like a regular assignment, putting the value of xyz into DATE$? What a crazy environment to work in. I mean you can do the same in C++ and I hear its very easy to do in .NET also, but I've never heard of it being built-in to the API.

    PS the captcha dictionary has like, maybe 10 words in it. how many times have i gotten poprocks?

    I assume the actual contents of $DATE afterwards is the system date at the time you access it - so you get back the date you put in, as long as you don't wait too long to look.

    Of course, the real WTF is that what looks like ordinary variable access has such nasty side-effects. In some ways, it's even more evil than warped use of operator overloading. Also, if I'm understanding this correctly, you can set just the date without changing the time (and presumably vice-versa) - can anyone say "race condition"?



    Don't be so quick with the NOOB! Having a programming project in 5th grade? You're pretty young yourself. I didn't stumble on a PC in my school til 7th grade, and didn't have a class with it til junior or senior year.

    Captcha: CRAPTASTIC

  • (cs) in reply to Hexar
    Anonymous:

    The Real WTF(tm) is that Europe uses DD/MM/YYYY for dates.  Which is kinda like saying The Real WTF is that the rest of the world uses the metric system.  Go USA!

     

    The real WTF is how few people use ISO standard dates. 20060712 forever!

  • (cs) in reply to Unklegwar
    Anonymous:
    Ken:

    Anonymous:
    Wouldn't it be great if an ordinary application did not have the privilege of changing the system's date? Can you dare to imagine such a revolutionary concept?

    An *ordinary* application?  What exactly entails an *ordinary* application?

    And what would do if you DID need to change the system date?  Set ExtraOrdinary = True? 



    Public Sub ChangeSystemDate(newDate as date)
        Application.Fabulous = True
        Date$ = newDate
        Application.Fabulous = False
    End Sub

    I think what he means by ordinary is an application that is running with user privileges as opposed to administrator/root privileges. This does make sense, and might already be true for *nix systems, or maybe *nix systems have user time and system time..... I dunno. I never really looked into it.
  • scmason (unregistered)

    You know what I think the real WTF is? That Microsoft lets an unprivilaged script in the user space do something like setting the system date. Don't believe that is a problem? Reread the post.

  • jey (unregistered) in reply to scmason

    It's a double sided error... my personal favorite...

    1. Always assume that Date, Time, Today, System, Unit, Print ... etc are reserved words.... if it capitalized it for you, and you don't have it defined, it's not yours.


    2.  Why would VBA need system time write access with a variable?  Stupid to me.

    but, both the programmer of VBA and the Programmer of this App must be at about the same level.

  • radiantmatrix (unregistered) in reply to BiggBru

    <font face="Georgia">And I thought that HPC stood for Hydrometeorological Prediction Center. I stand corrected...


    Well, it's close.  Your HPC can tell you the chances of rain in the near future.  Being aware of the other HPC's engagement can tell you there's a good chance it will rain shit in the near future.
    </font>
  • DosDoesDateDude (unregistered) in reply to dpm

    dpm:
    Dazed:

    - that it isn't called something sensible like SET_SYSTEM_DATE, or at least SETDATE;

    What do you think the command "date" does in both unix shells and DOS/Windows command line?

    ok
    dpm

    C:\>date /?
    Displays or sets the date.

    DATE [/T | date]

    Type DATE without parameters to display the current date setting and
    a prompt for a new one.  Press ENTER to keep the same date.

    If Command Extensions are enabled the DATE command supports
    the /T switch which tells the command to just output the
    current date, without prompting for a new date.

  • (cs) in reply to scmason
    Anonymous:
    You know what I think the real WTF is? That Microsoft lets an unprivilaged script in the user space do something like setting the system date. Don't believe that is a problem? Reread the post.

    <sarcasm>
    NO WAY! That is TOTALLY not the WTF! Microsoft is the #1 best software company of all time! They NEVER make anything without thoroughly thinking through ALL ASPECTS, and then they ALWAYS produce SOLID, STABLE, MAITENENCE FREE products that should cost AT LEAST 1000x what they charge! Microsoft would NEVER violate the buyer's trust by supplying them with INFERIOR, INSECURE, BUGGY, BLOATED, UNSTABLE crap at a higher cost.
    </sarcasm>

    lol...
    Does anyone even expect microsoft to implement a proper priviledge system in Vista? Or document it well for that matter? I know I don't... I expect that to be happening around 2020, assuming Microsoft is still around, but that's just me... Yeah, Microsoft needs to get their act together when it comes to their OS.

  • (cs) in reply to chris
    Anonymous:
    as soon as y'all stop describing how much people weigh using "stones" (WTF is that, anyway?) then we can talk about the metric system.

    as for fahrenheit -- it runs from intolerably cold at 0 degrees to intolerably hot at 100. we won't be losing that for some arbitrary system based on chemistry any time soon.

    "Tolerable" is relative.  I just came back from lunch, and it's something like 118° outside, and scheduled to top 125°, but at about 4% humidity.  I can tolerate that.  Transplant me somewhere that's only 90° and 50%+, and I can't breathe; I call that intolerable.  The point is, they're both arbitrary systems.  What's wrong with using the one that's closer to "absolute" numbers?

    I propose a new system, because the '°' is too difficult to type:  The freezing temperature of beer will be called 'a', while the temperature inside the car after 6 hours in the July sun will be "z."

    And just to finish stirring the shit-pot, I'm American, I prefer the metric system, and I tend to write dates as yyyy-mm-dd because there's little chance of mistaking it.
  • Mark H (unregistered) in reply to Dazed
    HitScan:
    Now that languages come with multi-megabyte SDK's, 600-page manuals, and it takes ten classes to say Hello World, what language can one offer to children to play around with?


    does Logo still exist?
  • (cs) in reply to Dazed
    Anonymous:
    HitScan:
    It used to be halfway useful in BASICA and GWBASIC ...

    Leaping off onto another subject entirely ... Back in those days you could point a child at BASIC and let him play with it a bit to get a feel of what a program was. The manual was about 3 pages, and you could write a simple program in half-a-dozen lines.

    Now that languages come with multi-megabyte SDK's, 600-page manuals, and it takes ten classes to say Hello World, what language can one offer to children to play around with?



    Actually, you didn't even need the manual. I learned all of the GWBASIC that I knew for a long time by holding Control and htting a letter, and it would spell it out automatically. Then add params and see what breaks/works. I figured out almost all of the common use stuff, but never did know how to use graphics until I got ahold of some basic shareware.

    That's real discoverability. And it's got a snoball's chance in hell of ever coming back. :(

  • (cs) in reply to GoatCheez
    GoatCheez:
    Yeah, Microsoft needs to get their act together when it comes to their OS.

    <sarcasm>
    Wait a second!  Are you insinuating that keeping my $500 grafix card running at full throttle all the time so that I can have a wicked cool 3d desktop is *less* important than increasing stability, fixing bugs and improving security?  NO WAY!
    </sarcasm>
  • Boris Zakharin (unregistered) in reply to Dazed
    Anonymous:
    HitScan:
    It used to be halfway useful in BASICA and GWBASIC ...

    Leaping off onto another subject entirely ... Back in those days you could point a child at BASIC and let him play with it a bit to get a feel of what a program was. The manual was about 3 pages, and you could write a simple program in half-a-dozen lines.

    Now that languages come with multi-megabyte SDK's, 600-page manuals, and it takes ten classes to say Hello World, what language can one offer to children to play around with?

  • (cs) in reply to Johnny Gore
    Anonymous:
    Okay, sure, having a function to set the system date, built in to VBA, is a pretty bad idea. They could've at least made programmers use a Win32 API function.

    However, how many programmers here would actually code a statement like this?

    Date = "07/12/2006"

    To even consider using an OBVIOUSLY reserved system word requires you to be pretty messed up in the head. That would be like trying to write:

    String = "some string"



    In old BASICs it didn't matter, because strings had to be suffixed with $. You could easily use if$, then$, rem$ and whatnot, so long as the reserved word didn't also have a $, such as date$ and input$ (there may have been a print$, but it's been too long for me to remember.) You could also use % for ints (I think) and I believe that every reserved word would work with that, and whatever the float/long/etc suffixes were.

    Double check the FP, he used Date$, not Date. All prior experience would point to it working perfectly, unless you knew about it's special function.

  • (cs) in reply to Dazed
    Anonymous:
    Now that languages come with multi-megabyte SDK's, 600-page manuals, and it takes ten classes to say Hello World, what language can one offer to children to play around with?


    perl.  But then again, I was never very good with children.
  • Zahlman (unregistered) in reply to Sgt. Zim
    Sgt. Zim:
    Anonymous:
    as soon as y'all stop describing how much people weigh using "stones" (WTF is that, anyway?) then we can talk about the metric system.

    as for fahrenheit -- it runs from intolerably cold at 0 degrees to intolerably hot at 100. we won't be losing that for some arbitrary system based on chemistry any time soon.

    "Tolerable" is relative.  I just came back from lunch, and it's something like 118° outside, and scheduled to top 125°, but at about 4% humidity.  I can tolerate that.  Transplant me somewhere that's only 90° and 50%+, and I can't breathe; I call that intolerable.


    I would have difficulty breathing at 4% humidity regardless of the temperature :\
  • (cs) in reply to Mark H
    Anonymous:
    HitScan:
    Now that languages come with multi-megabyte SDK's, 600-page manuals, and it takes ten classes to say Hello World, what language can one offer to children to play around with?


    does Logo still exist?


    1: You seem to have misslabeled the quote, as I didn't make that post. :)

    2. Yes, but I don't know how popular it is. There's a Logo available from the KDE project, and I think there are some versions available for Windows, but I've not really thought much about it since '92-'93. Honestly, I learned more from messing around with a text mode BASIC than I did from Logo (that may have as much to do with the Logo teacher as it does the language though.) MS should have kept QBasic hidden someplace in \Windows\whatever\ because it's built in help really helped me learn how to make the most of it. Also, text based languages are vastly easier to get started in. QB hello world can be 1 line, but it's a shitload more in Win32 or even VB.
  • PhilzFromCanada (unregistered) in reply to ISO

    YYYY-MM-DD, isn't it the best way to store dates? If in clear text, isn't it easier to sort? Go USA! Go Go Go!

  • (cs) in reply to Dazed
    Anonymous:
    - that Windows doesn't have a proper security system to prevent arbitrary apps doing this sort of thing;

    It does. For some reason, though, it is considered perfectly normal to use Windows computers logged in as an administrator.

    Anonymous:
    - that the dates on the forms were hardcoded in American format in an app shipped to Europe;

    Also, there's more than one 'European date format'. The UK and Ireland tend to use DD/MM/YYYY, while on the continent YYYY-MM-DD seems more common.

  • Gabe (unregistered) in reply to GoatCheez

    GoatCheez:

    lol...
    Does anyone even expect microsoft to implement a proper priviledge system in Vista? Or document it well for that matter? I know I don't... I expect that to be happening around 2020, assuming Microsoft is still around, but that's just me... Yeah, Microsoft needs to get their act together when it comes to their OS.

    The real WTF is people who are seemingly intelligent enough to comprehend the WTFs, while not being smart enough to look into even the basics of Windows security as it has been for over 13 years!

    While the ability to configure what users have the right to change the system clock has been around since the first version of Windows NT in 1993, the interface was changed in 2000. Go to Administrative Tools|Local Security Settings|Local Policies|User Rights Assignment, and look for the right called "Change the system time". By default administrators and power users have the right, and most users run as power users or administrators by default, so most users always have the ability to change the time.

    What Vista introduces is the ability to assign rights separately for changing the clock and changing the time zone. That way a laptop user can be prevented from screwing up their clock while still being able to tell their computer what time zone they have most recently traveled into.

    The only way to allow a Unix user to change the time is to give them complete 100% control over the machine. Or you could write an suid root program that has a non-standard way of assigning rights, and hope that you're a good enough suid programmer that you didn't just create a privilege elevation attack waiting to happen.

  • (cs) in reply to Dazed
    Anonymous:
    Now that languages come with multi-megabyte SDK's, 600-page manuals, and it takes ten classes to say Hello World, what language can one offer to children to play around with?

    Python springs to mind. And logo.

  • Blind (unregistered)

    SuCk
    Come on lets see some good wtfs!
    i want code!!! and really bad code (no vb, and no db crap)

  • (cs) in reply to My Name
    Anonymous:


    And the day will dawn when you want to write your fist system administration tool


    God, I remember the F.I.S.T. system. Those punchcards were a pain.
  • (cs) in reply to Johnny Gore
    Anonymous:
    Okay, sure, having a function to set the system date, built in to VBA, is a pretty bad idea. They could've at least made programmers use a Win32 API function.

    However, how many programmers here would actually code a statement like this?

    Date = "07/12/2006"

    To even consider using an OBVIOUSLY reserved system word requires you to be pretty messed up in the head. That would be like trying to write:

    I'd do it in C, where it OBVIOUSLY isn't reserved. Well, in practice I'd probably be cautious, but there's no huge reason why I SHOULDN'T.

  • (cs) in reply to Hexar
    Hexar:

    The Real WTF(tm) is that Europe uses DD/MM/YYYY for dates.  Which is kinda like saying The Real WTF is that the rest of the world uses the metric system.  Go USA!



    And it's remarks like these that make us want to have as little as posibble to do with the US.
    The fact that you still haven't figured this out after 514 years, is a genuine WTF.
  • (cs) in reply to DosDoesDateDude
    Anonymous:

    dpm:
    Dazed:

    - that it isn't called something sensible like SET_SYSTEM_DATE, or at least SETDATE;

    What do you think the command "date" does in both unix shells and DOS/Windows command line?

    ok
    dpm

    C:\>date /?
    Displays or sets the date.

    DATE [/T | date]

    Type DATE without parameters to display the current date setting and
    a prompt for a new one.  Press ENTER to keep the same date.

    If Command Extensions are enabled the DATE command supports
    the /T switch which tells the command to just output the
    current date, without prompting for a new date.

    Emphasis added

  • (cs) in reply to chris
    Anonymous:
    as soon as y'all stop describing how much people weigh using "stones" (WTF is that, anyway?) then we can talk about the metric system.

    That particular oddity is just for the UK and Ireland, where we continue to cling onto some of the vestiges of the Imperial system.

  • John (unregistered)

    Scripts should not be run as Admin/Root.

    even my home media linux box, I setup seperate accounts for the Fax software, Apache, DVR emulators, TFTP server, and my user desktop. Would have been easier to run it all as root in some ways; But seperating them allowed me to understand and control them much more effectivly. (I also learned IPTables! fun!)

    Software will have bugs; but allowing those bugs to contaminate other systems in uncontrolled ways is a seperate issue. (I hate the Java language, but I love the Java VM)

  • (cs) in reply to chris
    Anonymous:
    as soon as y'all stop describing how much people weigh using "stones" (WTF is that, anyway?)


    The only thing I know is that a woman who weighs in at 19 of 'em is a Whole Lotta...Something Something.
  • ISO (unregistered) in reply to Carnildo
    Carnildo:
    Anonymous:

    The Real WTF(tm) is that Europe uses DD/MM/YYYY for dates.  Which is kinda like saying The Real WTF is that the rest of the world uses the metric system.  Go USA!

     

    The *real* WTF is how few people use ISO standard dates. 20060712 forever!

    As I said before, yes, that's the correct way. If only some people would accept ISO's authority as the world standards organization... but nooo, let's continue measuring length in how long parts of your body are, rather than something that actually makes sense. Lots of ISO units fit together in a manner (for example, one cubic meter is 1000 liters, and that much water weighs about 1000 kilograms).

    Even without that, don't you think it's of some value to have ONE and ONLY ONE standard for things?

  • (cs) in reply to ISO
    Anonymous:

    ... but nooo, let's continue measuring length in how long parts of your body are



    I am two weiners tall.
  • Hantas (unregistered) in reply to rsynnott

    rsynnott:
    Anonymous:
    - that Windows doesn't have a proper security system to prevent arbitrary apps doing this sort of thing;
    It does. For some reason, though, it is considered perfectly normal to use Windows computers logged in as an administrator.
    Anonymous:
    - that the dates on the forms were hardcoded in American format in an app shipped to Europe;
    Also, there's more than one 'European date format'. The UK and Ireland tend to use DD/MM/YYYY, while on the continent YYYY-MM-DD seems more common.

    Well, in the Netherlands, YYYY-MM-DD is hardly ever used, besides by people clever enough to understand that YYYY-MM-DD sorts nicely when sorting alphabetically, but generally in forms, letter headers, receipts etc its all DD-MM-YYYY

  • Demaestro (unregistered)

    Another solution for them would just to print all forms once a month.
    On the first of Januray
    On the second of February
    On the third of March

    And so on... Then there is no issue.

  • (cs) in reply to Gabe
    Anonymous:

    GoatCheez:

    lol...
    Does anyone even expect microsoft to implement a proper priviledge system in Vista? Or document it well for that matter? I know I don't... I expect that to be happening around 2020, assuming Microsoft is still around, but that's just me... Yeah, Microsoft needs to get their act together when it comes to their OS.

    The real WTF is people who are seemingly intelligent enough to comprehend the WTFs, while not being smart enough to look into even the basics of Windows security as it has been for over 13 years!

    While the ability to configure what users have the right to change the system clock has been around since the first version of Windows NT in 1993, the interface was changed in 2000. Go to Administrative Tools|Local Security Settings|Local Policies|User Rights Assignment, and look for the right called "Change the system time". By default administrators and power users have the right, and most users run as power users or administrators by default, so most users always have the ability to change the time.

    What Vista introduces is the ability to assign rights separately for changing the clock and changing the time zone. That way a laptop user can be prevented from screwing up their clock while still being able to tell their computer what time zone they have most recently traveled into.

    The only way to allow a Unix user to change the time is to give them complete 100% control over the machine. Or you could write an suid root program that has a non-standard way of assigning rights, and hope that you're a good enough suid programmer that you didn't just create a privilege elevation attack waiting to happen.



    The system clock is just the tip of the iceberg.

    The real WTF is people who are seemingly intelligent enough to comprehend the intricacies of the windows system clock, while not being smart enough to observe commenting on the fundamental flaws in Windows security as it has been for over 13 years!

    Insulting others' intelligence is never a nice thing to do, unless it's their code that was posted ;-P
  • Patrik (unregistered) in reply to rsynnott
    rsynnott:
    Also, there's more than one 'European date format'. The UK and Ireland tend to use DD/MM/YYYY, while on the continent YYYY-MM-DD seems more common.

    We even use DD. MM. YYYY here. Looks nicer than these ugly slashes, doesn't it?

    dpm:
    My Name:
    dpm:
    Dazed:
    - that it isn't called something sensible like SET_SYSTEM_DATE, or at least SETDATE;
    What do you think the command "date" does in both unix shells and DOS/Windows command line?

    $ date Wed Jul 12 20:35:47 CEST 2006 $ date -s 2006-11-11 date: cannot set date: Operation not permitted Sat Nov 11 00:00:00 CET 2006 $ su Password:

    date -s 2006-11-11

    Sat Nov 11 00:00:00 CET 2006

    What's your point? I was discussing the name, not whether the usage is restricted.

    It does what you are expecting it to do, doesn't it? If you don't give it an argument, you get the current time, if you do, you change the time. But $ date = 2005-06-07 certainly won't work.

    Captcha: genius. I feel flattered...

  • (cs) in reply to chris
    Anonymous:
    as soon as y'all stop describing how much people weigh using "stones" (WTF is that, anyway?) then we can talk about the metric system.

    as for fahrenheit -- it runs from intolerably cold at 0 degrees to intolerably hot at 100. we won't be losing that for some arbitrary system based on chemistry any time soon.


    I have yet to meet a temperature scale that is based on chemistry.

    Celsius is based on physics.
  • AStrutzenberg (unregistered) in reply to HitScan

    What about command line C#?   

  • xcor057 (unregistered) in reply to NateB2
    Anonymous:

    Actually, there is a *small* use for the Date$ function.  In Excel, I have numerous macros that run on certain days, creating files that have a time-date stamp, open files that were made a previous week, etc. On some occasions (like after holidays), I have to set my system clock back and run the macros as if they were running on that day.  This statement makes it it possible to automate that procedure.

    This, of course, is no excuse for the way the Date$ function was used in TDWTF

    If your spreadsheet maintained a list of holidays then your macro would know to subtract two days instead of 1.  How in the world do you handle weekends with this method?

  • xcor057 (unregistered) in reply to bobo1on1

    Actually Celsius was defined using the specific heat of water. Specific heat was originally a chemistry metric.

  • (cs) in reply to John Bigboote
    John Bigboote:
    Anonymous:

    ... but nooo, let's continue measuring length in how long parts of your body are



    I am two weiners tall.


    Do you play piano?  My wife keeps telling me she is looking for a 10 inch pianist.
  • Tom (unregistered)

    Whoever decided to call the SetSystemDate function simply DATE had very little programming experience. Descriptive naming anyone?

    Of course the ISO date format is the most logical. The most significant digit gotta come first -- 523 is not Three Hundred and Fifty Two. In most cases it doesn't matter too much, but... have you ever tried to use MM-DD-YYYY in file names? In a file system the YYYY-DD-MM format is mandatory, or else you simply can't sort by name!

    Tom

Leave a comment on “Long Distance DATE$ing”

Log In or post as a guest

Replying to comment #:

« Return to Article