Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Displaying date/time!


Hi

Was wondering whether ANYONE can help!

I am importing some data from a csv file into an xls, by pressing
button (with macros behind it) - now what I am also looking to do i
for the time and date to display on the form, once every import is don
(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? Otherwis
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!

--
Pree
-----------------------------------------------------------------------
Preet's Profile: http://www.excelforum.com/member.php...nfo&userid=315
View this thread: http://www.excelforum.com/showthread.php?threadid=39381

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Displaying date/time!


"Preet" wrote in
message ...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Displaying date/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 YO
THANK YOU THANK YOU :) THANK YOU THANK YOU THANK YOU THANK YO

--
Pree
-----------------------------------------------------------------------
Preet's Profile: http://www.excelforum.com/member.php...nfo&userid=315
View this thread: http://www.excelforum.com/showthread.php?threadid=39381

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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"
wrote in message
...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Displaying date/time!


Hi Chris

Thank you for ur reply, that worked!

Very Grateful.

Preet x


--
Preet
------------------------------------------------------------------------
Preet's Profile: http://www.excelforum.com/member.php...fo&userid=3155
View this thread: http://www.excelforum.com/showthread...hreadid=393818



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Entering and displaying time jdj420 Excel Discussion (Misc queries) 1 April 14th 10 10:08 PM
Converting text format of time/date into Excel time/date for subtr YY san.[_2_] Excel Worksheet Functions 6 February 25th 10 08:27 AM
Displaying time from 00:00 to 0.00 North for Short New Users to Excel 6 June 28th 06 05:45 AM
Displaying Unix time as date and time [email protected] Excel Discussion (Misc queries) 1 May 30th 06 10:28 PM
Calculating days & time left from start date/time to end date/time marie Excel Worksheet Functions 7 December 7th 05 02:36 PM


All times are GMT +1. The time now is 08:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"