Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default converting 'TODAY' into dd-mmm-yy format

I have the following code which converts some textbox text into the
format i need

mydatestr = Format(CDate(TextBox2.Text), "dd-mmm-yy")

what i also need is to get todays date and put that into the same
format as well but substituting textbox2.text for TODAY doesnt seem to
work.


---
Message posted from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default converting 'TODAY' into dd-mmm-yy format

In VBA, DATE is equivalent to Today in the worksheet

mydatestr1 = Format(CDate(Date), "dd-mmm-yy")

--
Regards,
Tom Ogilvy


"neowok " wrote in message
...
I have the following code which converts some textbox text into the
format i need

mydatestr = Format(CDate(TextBox2.Text), "dd-mmm-yy")

what i also need is to get todays date and put that into the same
format as well but substituting textbox2.text for TODAY doesnt seem to
work.


---
Message posted from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default converting 'TODAY' into dd-mmm-yy format

nice that worked.

thank

--
Message posted from http://www.ExcelForum.com

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
Need help with converting CUSTOM format/TEXT format to DATE format Deo Cleto Excel Worksheet Functions 6 June 2nd 09 08:14 PM
Conditional Format <=Today() Matt D Francis Excel Worksheet Functions 0 March 28th 07 02:46 AM
Conditional Format <=Today() Marcelo Excel Worksheet Functions 0 March 28th 07 02:45 AM
MM/DD/YYYY format Today Glenda Excel Discussion (Misc queries) 1 February 21st 06 03:51 PM
Custom Format for WEEKNUM(Today()) RonB Excel Discussion (Misc queries) 2 January 12th 05 06:13 PM


All times are GMT +1. The time now is 03:27 PM.

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

About Us

"It's about Microsoft Excel"