+ Reply to Thread
Results 1 to 4 of 4

Formate( date, dd/mm/yyyy) use making my dates today's date

Hybrid View

  1. #1
    Registered User
    Join Date
    12-03-2013
    Location
    bangalore,india
    MS-Off Ver
    Excel 2003
    Posts
    29

    Formate( date, dd/mm/yyyy) use making my dates today's date

    Hi Experts,

    I have a problem. When make use for format date it making my date as today's, how to retain the date which I had entered earlier.

    Example:
    Entered date as below: 13/11/2013
    DOBBox.Value = Format$(Date, "DD/MM/YYYY")
    Cells(LastRow, 19).Value = Month(DOBBox.Value)

    saves the data as 18/12/2013, that today's date. Instead I need 13/11/2013 (which I had entered in my DOBbox text box.

    Could anyone help in this regards?

    Thanks in advance.

    Pradeep

  2. #2
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Formate( date, dd/mm/yyyy) use making my dates today's date

    You are using current date (Date) so its showing current date and not the entered date value

    So change this

    DOBBox.Value = Format$(Date, "DD/MM/YYYY")
    to

    DOBBox.Value = Format$(DOBBox.Value, "DD/MM/YYYY")
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  3. #3
    Registered User
    Join Date
    12-03-2013
    Location
    bangalore,india
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: Formate( date, dd/mm/yyyy) use making my dates today's date

    Thanks a lot, it started to work for me.

  4. #4
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Formate( date, dd/mm/yyyy) use making my dates today's date

    You are welcome.

    Please mark this thread as solved , if you are satisfied with the solution.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Imported data contains strings dd.mm.yyyy how can I convert to date format dd/mm/yyyy inVB
    By Boormo in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-05-2012, 05:48 PM
  2. [SOLVED] COUNTIF between two dates and also before today's date
    By fireandrain in forum Excel General
    Replies: 2
    Last Post: 04-09-2012, 10:21 PM
  3. Making MonthView default to today's date or leave blank
    By raehippychick in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-21-2008, 11:30 AM
  4. [SOLVED] Are 2 dates between today's date
    By Re: Pivot Table/Query in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-08-2005, 05:05 PM
  5. Date problem when opening a csv with dates in dd-mm-yyyy format.
    By Jeroen Hofs in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-19-2005, 05:05 AM

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