Hi All,
Finally have a little time to get back to this. Sorry for the delay.
I have tried as many combinations as I can think of but keep getting the compile error SQL0206
<field name> not in specified tables.
The things I have tried are:
SelectDate (Date Data Type)
StartTime (Timestamp)
EndTime (Timestamp)
where date(Modify_Time) = Selectdate
Where Modify_Time >= StartTime And
Modify_Time <= EndTime
Where Modify_Time >= Timestamp(StartTime) And
Modify_Time <= Timestamp(EndTime)
The line below works as expected in a different pgm. This selects everything older than the number of days to the second.
Where Modify_Time < Current TimeStamp - :Days days;
It always gives me the same error.
I think the Modify_Time from the IFS is in a different type of format, isn't it?
What the heck am I doing wrong?
Thanks!!
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Stuart Rowe
Sent: Thursday, April 24, 2014 12:16 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: Set TimeStamp To Beginning of day
StartStamp = <inputted date> + t'00.00.00'; EndStamp = <inputted date> + t'24.00.00';
Or like Michael said
where date(Modify_Time) = <inputted date>
On Thu, Apr 24, 2014 at 12:03 PM, Michael Ryan <michaelrtr@xxxxxxxxx> wrote:
How about just looking at the date portion, and order it by Modify_Time?
On Thu, Apr 24, 2014 at 1:00 PM, (WalzCraft) Jerry Forss <
JForss@xxxxxxxxxxxxx> wrote:
Hi All,
The user enters the date they want to select like 20140424.
The items I am selecting from are PDF's on the IFS.
I want to use the WHERE to select on the Modify_Time selecting on
the timestamp of the day the user entered.
What I need is a timestamp set to the start of the day 2014.04.24
00.00.00
and another 2014.04.24 24.00.00 for the end of the day.
How do I set those timestamp variables like that? Drawing a blank.
Exec SQL Declare C1 Cursor For
Select FileName, Size, Type, Create_Time,
Access_Time, Modify_Time, Change_Time
From Table(IFSDir(:Path)) as T
Where Modify_Time >= StartStamp And Modify_Time <=
EndStamp
Thanks!!
Subject to Change Notice:
WalzCraft reserves the right to improve designs, and to change specifications without notice.
Confidentiality Notice:
This message and any attachments may contain confidential and privileged information that is protected by law. The information contained herein is transmitted for the sole use of the intended recipient(s) and should "only" pertain to "WalzCraft" company matters. If you are not the intended recipient or designated agent of the recipient of such information, you are hereby notified that any use, dissemination, copying or retention of this email or the information contained herein is strictly prohibited and may subject you to penalties under federal and/or state law. If you received this email in error, please notify the sender immediately and permanently delete this email. Thank You;
WalzCraft PO Box 1748 La Crosse, WI. 54602-1748
www.walzcraft.com Phone... 608-781-6355
As an Amazon Associate we earn from qualifying purchases.