+ Reply to Thread
Results 1 to 5 of 5

Displaying date/time!

Hybrid View

  1. #1
    Registered User
    Join Date
    11-26-2003
    Posts
    4

    Unhappy Displaying date/time!

    Hi

    Was wondering whether ANYONE can help!

    I am importing some data from a csv file into an xls, by pressing a button (with macros behind it) - now what I am also looking to do is for the time and date to display on the form, once every import is done (through button click).

    2 questions:

    1) How do I get the macro to locate current system date?

    2) How do I specify where I want the date to be located? Otherwise where would it locate the date on the spreadsheet?

    Ive tried this:

    Dim Today
    Today = Now

    But it didnt help! :- (

    Thank you for looking at this! x

  2. #2
    Bob Phillips
    Guest

    Re: Displaying date/time!


    "Preet" <Preet.1tfzud_1123499125.3994@excelforum-nospam.com> wrote in
    message news:Preet.1tfzud_1123499125.3994@excelforum-nospam.com...
    >
    > Hi
    >
    > Was wondering whether ANYONE can help!
    >
    > I am importing some data from a csv file into an xls, by pressing a
    > button (with macros behind it) - now what I am also looking to do is
    > for the time and date to display on the form, once every import is done
    > (through button click).
    >
    > 2 questions:
    >
    > 1) How do I get the macro to locate current system date?


    That is Date

    > 2) How do I specify where I want the date to be located? Otherwise
    > where would it locate the date on the spreadsheet?


    Range("A1").Value = Format(Date,"dd mmm yyyy")



  3. #3
    Registered User
    Join Date
    11-26-2003
    Posts
    4

    Smile Time?

    THANK YOU David!

    That worked - BUT! How do I get time displayed? (excluding seconds)

    THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU

  4. #4
    Chip Pearson
    Guest

    Re: Displaying date/time!

    Preet,

    'Now' returns both the date and time, so you can use the Format
    function to return a date/time string in any format you want.
    E.g.,

    Range("A1").Value = Format(Now, "mm/dd/yyyy hh:mm")


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com




    "Preet" <Preet.1tg86m_1123509982.4596@excelforum-nospam.com>
    wrote in message
    news:Preet.1tg86m_1123509982.4596@excelforum-nospam.com...
    >
    > THANK YOU David!
    >
    > That worked - BUT! How do I get time displayed? (excluding
    > seconds)
    >
    > THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU
    > THANK YOU
    > THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU
    >
    >
    > --
    > Preet
    > ------------------------------------------------------------------------
    > Preet's Profile:
    > http://www.excelforum.com/member.php...fo&userid=3155
    > View this thread:
    > http://www.excelforum.com/showthread...hreadid=393818
    >




  5. #5
    Registered User
    Join Date
    11-26-2003
    Posts
    4

    Thumbs up that worked

    Hi Chris

    Thank you for ur reply, that worked!

    Very Grateful.

    Preet x

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1