Search:

Type: Posts; User: Elroy

Search: Search took 0.08 seconds.

  1. Replies
    24
    Views
    2,903

    Re: Format Function in date array

    Hi Dilettante,

    Actually, you can go less than one. It just starts counting the days backwards from 12/30/1899.

    Take Care,
    Elroy



    debug.Print format$(-5, "mm/dd/yyyy") ' <--- prints:...
  2. Replies
    24
    Views
    2,903

    Re: Format Function in date array

    Hi IkkeEnGij,

    I'm not sure what you're trying to say there, but maybe try the following code:



    Dim D As Date
    For D = #12/28/1899# To #1/1/1900# Step 0.125
    Debug.Print...
  3. Replies
    24
    Views
    2,903

    Re: Format Function in date array

    Now that's a bit of a fun problem, and I'll accept that as a challenge. Also, I'm going to do it without using any of the built-in date functions, as they'd just make it more complex.

    Building on...
  4. Replies
    24
    Views
    2,903

    Re: Format Function in date array

    Hey Techgnome,

    Just wondering what you mean by the bolded part of what I've quoted. A Date is truly just a special case of a Double where 0 = #12/30/1899 00:00:00#
    The integer part is a count of...
  5. Replies
    24
    Views
    2,903

    Re: Format Function in date array

    @Chris: So long as myData() is declared as a Date, nothing is going to go into it that "remembers" any formatting.

    @DataMiser: Yes, I like the way you said that.
  6. Replies
    24
    Views
    2,903

    Re: Format Function in date array

    Hi Daniel,

    Any variable declared as "Date" (array or not) knows nothing about any formatting. It's just a special case of an IEEE Double. It's only when you print (or otherwise show) the date...
Results 1 to 6 of 6



Click Here to Expand Forum to Full Width