none
Change Date Format VBA(MS Access) RRS feed

  • Question

  • Hi Friends,

    I want to change the date format to mm/dd/yyyy.

    I have a date: wednesday, April , 20 , 2014 10:36 PM

    I want to convert above date to : 04/20/2014

    Thanks,


    hi

    Friday, April 18, 2014 7:07 PM

All replies

  • Can you not just change the number format? Would help if you said which program, what version and what service pack.

    Rod Gill
    Author of the one and only Project VBA Book
    www.project-systems.co.nz

    Saturday, April 19, 2014 7:32 AM
  • Hi Gunti Kiran Kumar

    Where do you have this date? In a string?  April 20, 2014 was a
    Sunday!

    Anyway you should be able to convert such dates with VBA using the
    CDate() function. But you have to cut the weekday (which is wrong
    anyway) away before you convert it.
    Then you can use the Format() function to convert it to a Format of your
    choice.

    Henry

    Tuesday, April 22, 2014 8:27 AM