+ Reply to Thread
Results 1 to 10 of 10

Imported data contains strings dd.mm.yyyy how can I convert to date format dd/mm/yyyy inVB

  1. #1
    Registered User
    Join Date
    09-05-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Imported data contains strings dd.mm.yyyy how can I convert to date format dd/mm/yyyy inVB

    Hi,

    Reletively new to VBA but learning quickly!!!

    I have inherited some sheets which contain data exported from an SAP based system. The data is cool however all dates are exported as a string in the form dd.mm.yyyy. I need to convert these columns(3 columns C,F and I) of "string dates" to date formats dd/mm/yyyy, 3 columns C,F and I.

    Am able to do this outside of VBA i.e in the sheets themselves with Formulae etc.. but need to encorporate this conversion in a VBA routine.

    Please help, have come un stuck as any attempts seems to return a mixture of dd/mm or mm/dd.

    Cheers

  2. #2
    Registered User
    Join Date
    11-16-2011
    Location
    San Diego, California
    MS-Off Ver
    2007
    Posts
    78

    Re: Imported data contains strings dd.mm.yyyy how can I convert to date format dd/mm/yyyy

    This is how you can handle it:

    Please Login or Register  to view this content.
    Last edited by WorldBridge; 09-05-2012 at 04:32 PM.

  3. #3
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,077

    Re: Imported data contains strings dd.mm.yyyy how can I convert to date format dd/mm/yyyy

    @ WorlBridge,

    Nice! Short and sweet complete answer.

  4. #4
    Registered User
    Join Date
    11-16-2011
    Location
    San Diego, California
    MS-Off Ver
    2007
    Posts
    78

    Re: Imported data contains strings dd.mm.yyyy how can I convert to date format dd/mm/yyyy

    Thanks! I would not be upset with some positive reputation...

    I've had to tackle so many of these problems doing my budget program that I just have to look up the solution in my own code lol

    Quote Originally Posted by Winon View Post
    @ WorlBridge,

    Nice! Short and sweet complete answer.

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,077

    Re: Imported data contains strings dd.mm.yyyy how can I convert to date format dd/mm/yyyy

    Yeah, No harm in doing that for you. Could you also perhaps press a few buttons to return the favour. LOL !

  6. #6
    Registered User
    Join Date
    11-16-2011
    Location
    San Diego, California
    MS-Off Ver
    2007
    Posts
    78

    Re: Imported data contains strings dd.mm.yyyy how can I convert to date format dd/mm/yyyy

    It won't let me. I get a message saying I must spread some reputation around before giving you any more.
    You've become too helpful for your own good.

    Quote Originally Posted by Winon View Post
    Yeah, No harm in doing that for you. Could you also perhaps press a few buttons to return the favour. LOL !

  7. #7
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,077

    Re: Imported data contains strings dd.mm.yyyy how can I convert to date format dd/mm/yyyy

    @ WorldBridge,

    Thank you WorldBridge, nice to have you as a friend!

  8. #8
    Registered User
    Join Date
    09-05-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Imported data contains strings dd.mm.yyyy how can I convert to date format dd/mm/yyyy

    Thanks worldbridge!, this allows me to achieve exactly what I need. Can see where I was going wrong.

    Thanks!

  9. #9
    Registered User
    Join Date
    11-16-2011
    Location
    San Diego, California
    MS-Off Ver
    2007
    Posts
    78

    Re: Imported data contains strings dd.mm.yyyy how can I convert to date format dd/mm/yyyy

    My pleasure.
    Please mark the thread as solved by going to Thread tools > Mark this thread as solved
    located at the top of your initial post.

    And I would appreciate if you clicked the star under my name in my post to you and gave me positive reputation.

    Quote Originally Posted by Boormo View Post
    Thanks worldbridge!, this allows me to achieve exactly what I need. Can see where I was going wrong.

    Thanks!

  10. #10
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,077

    Re: Imported data contains strings dd.mm.yyyy how can I convert to date format dd/mm/yyyy

    @ WorldBridge,


    Hi WorlBridge,

    No need to quote an OP's reply everytime as the Moderators of this Forum do not take kindly to that, especially if it happens to be a bit large.

    Keep up the good work,

+ 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