Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Date Formatting (A2K SR1)

    I have VBA code that uses the "Now()" function to return a date string. I need to format this string to dd-mmm-yyyy hh:mm. Does anyone know if there is a way to do this in code?

    Thanks Everybody!
    Mark Santos

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Date Formatting (A2K SR1)

    Hi,
    Try:
    format(now(),"dd-mmm-yyyy hh:mm")
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Date Formatting (A2K SR1)

    how about: format(Now( ), "dd-mmm-yyyy hh:mm")
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •