A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Writing Todays Date to an Excel Worksheet



 
 
Thread Tools Display Modes
  #1  
Old September 17th, 2003, 11:03 AM
dawhyte
external usenet poster
 
Posts: n/a
Default Writing Todays Date to an Excel Worksheet

Hi All,

I`m looking for a function in excel that will return todays date in a
‘yyyymmdd’ format when a worksheet opens.

This date would be populated on several cells on the worksheet.

I noticed a TODAY() function in excel but not sure if this can be
changed to suit the format I need

Any hints or tips ?

Thanks


Derek



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2  
Old September 17th, 2003, 11:54 AM
Paul B
external usenet poster
 
Posts: n/a
Default Writing Todays Date to an Excel Worksheet

Derek, use =TODAY() and format the cell as custom yyyymmdd
--
Paul B
Always backup your data before trying something new
Using Excel 2000 & 97
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **
"dawhyte" wrote in message
...
Hi All,

I`m looking for a function in excel that will return todays date in a
'yyyymmdd' format when a worksheet opens.

This date would be populated on several cells on the worksheet.

I noticed a TODAY() function in excel but not sure if this can be
changed to suit the format I need

Any hints or tips ?

Thanks


Derek



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



  #3  
Old September 17th, 2003, 01:42 PM
Ian P
external usenet poster
 
Posts: n/a
Default Writing Todays Date to an Excel Worksheet

simply select the cell with the date,
select 'format'
select 'cells'
select 'custom'
then in the box below 'TYPE:'
enter yyyymmdd

should work ok for you

Cheers
Ian

-----Original Message-----
Hi All,

I`m looking for a function in excel that will return

todays date in a
'yyyymmdd' format when a worksheet opens.

This date would be populated on several cells on the

worksheet.

I noticed a TODAY() function in excel but not sure if

this can be
changed to suit the format I need

Any hints or tips ?

Thanks


Derek



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from

http://www.ExcelForum.com/

.

  #4  
Old September 17th, 2003, 02:04 PM
anita
external usenet poster
 
Posts: n/a
Default Writing Todays Date to an Excel Worksheet

It can be done. If you use that function then right click
on the cell and put the format in that you want it. For
example if you choose date format and select the one you
want. You can make it any way you'd like.

Good luck.

-----Original Message-----
Hi All,

I`m looking for a function in excel that will return

todays date in a
'yyyymmdd' format when a worksheet opens.

This date would be populated on several cells on the

worksheet.

I noticed a TODAY() function in excel but not sure if

this can be
changed to suit the format I need

Any hints or tips ?

Thanks


Derek



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from

http://www.ExcelForum.com/

.

  #5  
Old September 17th, 2003, 02:30 PM
Gerry Ktua
external usenet poster
 
Posts: n/a
Default Writing Todays Date to an Excel Worksheet

Try Format Cells Custom type in your code in place of
General.
HTH
G
-----Original Message-----
Hi All,

I`m looking for a function in excel that will return

todays date in a
'yyyymmdd' format when a worksheet opens.

This date would be populated on several cells on the

worksheet.

I noticed a TODAY() function in excel but not sure if

this can be
changed to suit the format I need

Any hints or tips ?

Thanks


Derek



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from

http://www.ExcelForum.com/

.

  #6  
Old September 17th, 2003, 03:15 PM
dawhyte
external usenet poster
 
Posts: n/a
Default Writing Todays Date to an Excel Worksheet

Thanks for that.....

I`ll try this out when I can and I`ll let everyone know the outcome -
I`m sure it'll work...sounds like common sense solution to me.

Thanks again.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #7  
Old October 7th, 2003, 12:49 PM
dawhyte
external usenet poster
 
Posts: n/a
Default Writing Todays Date to an Excel Worksheet

Thanx for the response....

I`m actually doing this now and I`ve realised I need this solution
slightly modified....

The date/time value for the cell needs to be 16 characters long in the
following format

yyyymmddhhmmss(ms)(ms) .. this needs to be created as follows:

The first 8 chars (yyyymmdd) will be todays date "20031007"
and the last 8 chars (hhmmss(ms)(ms)) can be "00000000"

so I need several cells to be populated with the above when the
spreadsheet is opened...

I imagine this would be some VBA code to say:
1. get todays date
2. format it in 'yyyymmdd' format
3. add 8 zero's to the end of no. 2
4. write this to cell xx

So i really just need to find out how to use TODAY() to format to
'yyyymmdd'

Is it best to put this in the worksheet load event ?

Thanks for the help so far.

Derek



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #8  
Old October 17th, 2003, 02:09 PM
dawhyte
external usenet poster
 
Posts: n/a
Default Writing Todays Date to an Excel Worksheet

Just to let everyone know...i've managed to solve this now ..... thanks
Paul B... I actually implemented by setting the cell's formatting to
custom (yyyymmddmsmsmsms) and using the TODAY() formula

The 'ms' comes up as '0' so there are 8 zeros after the date.

Thanks

Derek



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #9  
Old October 17th, 2003, 02:31 PM
dawhyte
external usenet poster
 
Posts: n/a
Default Writing Todays Date to an Excel Worksheet

Just to let everyone know...i've managed to solve this now ..... thanks
Paul B... I actually implemented by setting the cell's formatting to
custom (yyyymmddmsmsmsms) and using the TODAY() formula

The 'ms' comes up as '0' so there are 8 zeros after the date.

Thanks

Derek



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:52 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.