Ask Experts Questions for FREE Help !
Ask
    janapalasunil's Avatar
    janapalasunil Posts: 3, Reputation: 1
    New Member
     
    #1

    Jan 24, 2016, 11:08 PM
    I had an string of date where user inputs the date in his format covert it to my own
    String date array has dates where user enters it and I don't know the format but I want to covert that into dd MMM yyyy format. Is it possible help me with the code.
    CravenMorhead's Avatar
    CravenMorhead Posts: 4,532, Reputation: 1065
    Adult Sexuality Expert
     
    #2

    Jan 25, 2016, 08:52 AM
    Without knowing the input format, it will be REALLY hard unless you have rules. For example if your rules are:
    1) Year is ALWAYS 4 numbers
    2) Month is ALWAYS 3 letter abbrevation.
    3). Day is ALWAYS 2 letters

    Then yes, you just need to tokenize the input and use a switch or if tree based on the string length of each token.

    If the input has NO rules... Good luck. What day is 2/10/2015 ? Feb or Oct?

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Create date from custom text string in excel [ 3 Answers ]

I need to convert a custom text to date in excel If custom number is 137910O39 1st 1 = Internet 2 = Phone 2nd Year 3 = 13 and 4 = 14 etc 3rd Month ID 7 = 0 and 8 = 1 4th Month ID2 1 - 9 w/ 7 in 3rd place = Jan - Sept 0 - 2 w/ 8...

Date converter english date to tibetan date [ 1 Answers ]

How to convert english date to tibetan date

Date Time format [ 2 Answers ]

Hi there, I know MySql is already to take YYYY-MM-DD HH:MM:SS. Therefore I need to write code to change this format when saving into MySql database from my asp.net/vb application. I have this code that does not work. It still saves as all zeros to the database. Does anyone have any clue hot...

How do I convert non-date string to a Date? [ 1 Answers ]

Hi - Okay, so here's my issue. I have a non-date string that I'd like to convert to a date format. This is what my non-date string looks like: 2009-01 and 2009-02, etc. I'd like to convert that to Jan-2009 or 01/09 under the date format. Can I do this?


View more questions Search