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

  • SEARCH
  • Home
  • 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 8000667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:52:33+00:00 2026-06-04T15:52:33+00:00

I have written a generic CSV file reader that I’m trying to use to

  • 0

I have written a generic CSV file reader that I’m trying to use to read some pre-generated CSV data files. These files contain price information and a timestamp in the following format

lTid,cDealable,NAME,TIMESTAMP,BID,ASK  <--- The header

1705852073,D,EUR/USD,2011-10-02 17:00:16.123000000,1.334400,1.334600

In my code I have assumed prices are, as you would expect, numeric, text is a String and dates are Java Date (it’s a little more complex but you get the idea). For dates the code allows you to pass a parsing template in. Up to now this has worked fine but I’m a little foxed as to what to do with these files (I have no control over the format and they are very large). As you will see the date has the form

2011-10-02 17:00:16.123000000

the six trailing zeros are always zero (i.e. the file time precision is down to milliseconds)

Ideally I would be able to use the pattern “yyyy-MM-dd HH:mm:ss.SSS” but sadly the parsing logic in SimpleDateFormat interprets “.123000000” as 123,000,000 milliseconds instead of 123ms.

Clearly if this were not a generic reader I could simply truncate the date string but I don’t have that choice. Is there any way to get the parse statement to use the ms digits only and ignore the trailing zeros?

  • 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-06-04T15:52:34+00:00Added an answer on June 4, 2026 at 3:52 pm

    Duplicate of Custom date format cannot be parsed. (Java)

    The conclusion is: SimpleDateFormat does not support microseconds, hence a custom parser has to be written.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a module that has some generic, reusable code that I would
I have written a class in python that implements __str__(self) but when I use
I have written some VSTO (2003) code that sucessfully applies some mandatory subject line
Suppose I have written a decorator that does something very generic. For example, it
Ok I have written some basic generic webservices before but I have never tried
I have written a toolbar that runs on the taskbar. Unfortunately, after it is
I have written a Python TCP/IP server for internal use, using win32serviceutil/py2exe to create
I have written a program that uses qhttp to get a webpage. This works
I have written a generic class class MyClass : MyClass<string> { } //this line
I have written the following method to detemine whether file in question is formatted

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.