Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Las Vegas, Nevada, USA
    Posts
    334
    Thanks
    8
    Thanked 0 Times in 0 Posts
    I have a question that involves transferring data from an iSeries application using IBM's iSeries Access for Windows so I can view or modify the results in Excel. My company uses a timekeeping system on an iSeries and I have a DTF file that selects and tranfers data from the iSeries app to a PC File so I can work with it in Excel.

    There's a log file in the timekeeping app that I'd like to bring over to Excel or Access. But I can't figure out how to get a date (or perhaps include a wildcard) into the Select field for the TIMESTAMP. Its a 26 character field containing full date info right down to the thousandths of a second. Like this: 2006-01-17-15.54.15.022000 (last three digits appear to always be "000").

    (TIMETR BETWEEN 2009-03-16* AND 2009-03-19*) returns a Token Not Valid error as does (TIMETR BETWEEN 2009-03-16 AND 2009-03-19)

    I'm not sure I'll get an answer here the way WOPR has helped me with Excel, but does anyone know of a forum that can help me with SQL or something similar?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    If it's a text field, you need to enclose the values in (single or double) quotes, e.g.

    TIMETR Between '2009-03-16' And '2009-03-19-23.59.59.999999'

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Las Vegas, Nevada, USA
    Posts
    334
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Thanks Hans. Again.

    This statement returns the expected results: (TIMETR >= '2009-03-21-14.00.00.000000') and (TIMETR <= '2009-03-22-14.00.00.000000')

    I thought I would need a wildcard in there somewhere, but I can just populate the string with zeroes for time (minutes, seconds and so on) to achive the results I'm looking for.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •