• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Urgent Help Required Pls!!!! how to extract date from file.

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let me see if I can put this specification correctly, I like to extract a date value and some text by reading lines from a text file. I want to start reading the line from a specfied position and read upto a certain position. Like the substring funtion and convert the string into a data value, then do some calculation with that date value.
Secondly what to do if I need to make this as an application which is running all the time on my PC and only crops up or bring up a dialogue box what a certain condition is met, e.g. if the date value is less sysdate-5.
Do i need to use jframe, jdialogue etc. to make the application.
Your help will be very appreciated.
regards.
[ January 20, 2003: Message edited by: Syed Ahsan ]
[ January 21, 2003: Message edited by: Ahs Hadi ]
 
Ahsan Hadi
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all, I am not getting much response on this forum so i will try and move this thread to a different forum. see if i can get some luck.
 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try looking at the java.io classes, specifically FileReader and BufferedReader to read in lines from a file. There are methods to read up to a new line, or a specific number of bytes.
For converting text to a date, look up the SimpleDateFormat class. You can define what format the date is in, and it will read a String and convert it to a Date.
 
This guy is skipping without a rope. At least, that's what this tiny ad said:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic