Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Splitting date string by date and time and assigning it to 2 variables

  1. #1
    Junior Member
    Join Date
    Jul 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Splitting date string by date and time and assigning it to 2 variables

    Hello Experts,

    I am very new to JAVA programming. I have an requirement of splitting a Date-Time String i.e. 2013/07/26 07:05:36

    As you observe the above string has Date and Time with space in between them.

    Now I want just want split the string not by delimiter but by length i.e. after 10th place and then assign it to 2 variable i.e. Date <----2013/07/26 and Time <---07:05:36 separately.

    Please share me the code.

    Regards
    Karan

    .
    Last edited by KaranSaxena; July 17th, 2014 at 04:41 AM. Reason: Spelling


  2. #2
    Member Ada Lovelace's Avatar
    Join Date
    May 2014
    Location
    South England UK
    Posts
    414
    My Mood
    Angelic
    Thanks
    27
    Thanked 61 Times in 55 Posts

    Default Re: Splitting date string by date and time and assigning it to 2 variables

    Please share me the code.
    Nobody will do the program for you and post the answer. If you are having problems
    then by all means ask away and show any code you have done to solve the problem
    with any errors etc.

    Wishes Ada xx
    If to Err is human - then programmers are most human of us all.
    "The Analytical Engine offers a new, a vast, and a powerful language . . .
    for the purposes of mankind
    ."
    Augusta Ada Byron, Lady Lovelace (1851)

Similar Threads

  1. date and time
    By gautammuktsar@gmail.com in forum Java Servlet
    Replies: 1
    Last Post: April 16th, 2014, 10:02 AM
  2. Current Date and Time to a String
    By Ryan7744 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 18th, 2014, 04:37 PM
  3. Using Date() to get Start Time and Finish Time of a copyFiles method
    By dalythe in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: June 17th, 2013, 09:50 PM
  4. Parsing a full date/time/timezone date to "yyyy-MM-dd"
    By Occidentally in forum What's Wrong With My Code?
    Replies: 3
    Last Post: November 4th, 2012, 08:57 AM
  5. Replies: 1
    Last Post: July 22nd, 2011, 07:08 AM