+ Reply to Thread
Results 1 to 6 of 6

Using NOW() date function

Hybrid View

PRodgers4284 Using NOW() date function 10-06-2009, 10:17 AM
dominicb Re: Using NOW() date function 10-06-2009, 10:23 AM
DonkeyOte Re: Using NOW() date function 10-06-2009, 10:26 AM
sweep Re: Using NOW() date function 10-06-2009, 10:26 AM
PRodgers4284 Re: Using NOW() date function 10-06-2009, 10:29 AM
ron2k_1 Re: Using NOW() date function 10-06-2009, 10:39 AM
  1. #1
    Registered User
    Join Date
    04-22-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    94

    Using NOW() date function

    I need some help formatting the NOW() function to display the current date as dd/mm/yy, at present it displays the date and time, i dont want the time included. Im using the code below to email a worksheet and i want the current date to be in the title:

    Application.Dialogs(xlDialogSendMail).Show "MyName@MyCompany.domain", fieldone & " " & fieldtwo & " " & Now() & " Name of workbook", True

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: Using NOW() date function

    Good afternoon PRodgers4284

    How about :
    Application.Dialogs(xlDialogSendMail).Show "MyName@MyCompany.domain", fieldone & " " & fieldtwo & " " & Format(Now(), "dd/mm/yy") & " Name of workbook", True
    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Using NOW() date function

    Worth adding perhaps that in VBA you have

    Date, Time, Now

  4. #4
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: Using NOW() date function

    or

    Application.Dialogs(xlDialogSendMail).Show "MyName@MyCompany.domain", fieldone & " " & fieldtwo & " " & Day(Now()) & "/" & Month(Now()) & "/" & Year(Now()) & " Name of workbook", True
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  5. #5
    Registered User
    Join Date
    04-22-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    94

    Re: Using NOW() date function

    Quote Originally Posted by dominicb View Post
    Good afternoon PRodgers4284

    How about :
    Application.Dialogs(xlDialogSendMail).Show "MyName@MyCompany.domain", fieldone & " " & fieldtwo & " " & Format(Now(), "dd/mm/yy") & " Name of workbook", True
    HTH

    DominicB

    Many thanks dominicb, that worked well

  6. #6
    Valued Forum Contributor ron2k_1's Avatar
    Join Date
    09-30-2009
    Location
    Not the USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    606

    Re: Using NOW() date function

    Well you said that you want your date format to be dd/mm/yy; you will notice that if you use sweep's suggestions it will give you September as "9" instead of "09" and 2009 instead of "09", if you really want the date format as you want it (dd/mm/yy).

    So you we can use sweep's concept and use this formula:
    Application.Dialogs(xlDialogSendMail).Show "MyName@MyCompany.domain", fieldone & " " & fieldtwo & " " & TEXT(NOW(),"dd/mm/yy") & " Name of workbook", True

+ 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