Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4025160
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:48:42+00:00 2026-05-20T10:48:42+00:00

I am currently reading a CSV file. I have to extract the dates from

  • 0

I am currently reading a CSV file. I have to extract the dates from it and add them to excel file in dd-MM-yy format. I am faced with two problems.

  1. I am using String.split(delim) where, delim="[,]". I am getting the date in yyyy-MM-dd format.
  2. I am not able to convert the string into a date format and then add them to excel file. I tried using DateFormat but error says Dateformat is abstract.

Here is the code

dtformat=new SimpleDateFormat("dd-MM-yy");
datenow=dtformat.parse(stringDate);//datenow is what i want to add to add.
datecell=new DateTime(tokenNumber, lineNumber, datenow);
sheet.addCell(datecell);

When I open the excel file, I get wild values.

Please help.Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T10:48:43+00:00Added an answer on May 20, 2026 at 10:48 am

    Google is your friend.

    To parse date:

    DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
    Date date = (Date)formatter.parse("2011 02 07");
    

    To write date:

    DateFormat customDateFormat = new DateFormat ("dd-MM-yy"); 
    WritableCellFormat dateFormat = new WritableCellFormat (customDateFormat); 
    sheet.addCell(new DateTime(/* date */, dateFormat)); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a .csv file with several unlabeled columns of data, which to
I have an application that loads data from a .csv file and shows it
We have a ColdFusion 9 script that runs regularly reading a CSV file and
When reading a CSV file from a server using the jQuery 'GET' function I
I'm currently reading Dive Into Python by Mark Pilgrim, and have gotten to the
have written a stochastic simulation in Java, which loads data from a few CSV
I'm currently reading the boot.s file in the source for the first ever Linux
I have a large CSV data file -- ~1,444,000 rows of data -- that
I have a strange problem: I have a CSV file that I read correctly
I am currently looking to process and parse out information from this .txt file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.