[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: date problems



Lisa,
By looking at your code you are in Peoplesoft
environment.
To get date from user, You can use sqc so that your
code still stays independent of the the database.
There are couple of procedures are already available
for date input from user.

1.Get-As-Of-Date
2.Get-From-Thru-Dates

Hope this helps
Arun
--- Peter Clark <PGCLARK@VAC-ACC.GC.CA> wrote:
> Betty, you beat me to the punch.
>
> I would wager that the culprit is SETENV.SQC. This
> sets several substitution variables for PeopleSoft
> date handling routines ... including Format-DateTime
> (in DateTime.sqc) which is invoked by the
> Convert-To-DTU-Date procedure in DateMath.sqc.
>
> Another possibility is that presumably (based on her
> use of the input command) Lisa's SQR is intended to
> run outside the PeopleSoft environment and is being
> run via SQRW. Lisa, is it possible that your command
> flags in SQRW are pointing to SQR.INI instead of
> PSSQR.INI (it is possible that these are not in
> synch)? This is where the SQR DB date format is
> defined (although I don't think your code would be
> dependant upon the DB date format).
>
> HTH, Peter
>
> >>> Betty Thompson <thompsob@MAIL.UWW.EDU>
> 2002/01/03 1:06:21 pm >>>
> I'm still a beginner, so bear with me, please, if
> this sounds silly...
>
> Could you be missing some variable value that
> affects how the functions
> work?
>
> I shoved your stuff into a shell program and it
> worked fine (I only omitted
> the
> 'if' statement with the 'goto Done').
>
> What I thought might be different is that I always
> use a shell with the same
> bunch
> of sqc includes.  I built this shell after going to
> SQR class, and I never
> really
> look at it any more, but I think it sets a lot of
> variables regarding dates.
>
> I attached my test program and the log from running
> it.
>
> Good luck.
> Betty
>
>
> -----Original Message-----
> From: Discussion of SQR, Brio Software's database
> reporting language
> [mailto:SQR-USERS@list.iex.net]On Behalf Of Shipley,
> Lisa A.
> Sent: Thursday, January 03, 2002 9:27 AM
> To: SQR-USERS@list.iex.net
> Subject: FW: date problems
>
>
> I've changed the input mask to fit the conversion
> mask and it still gives me
> the same error.
>
> INPUT $EndDate maxlen=11 'Enter end date
> (DD-MON-YYYY)'
> IF rtrim($EndDate, ' ') = ''
>    goto Done
> END-IF
>
>
> LET $end = strtodate($EndDate, 'DD-MON-YYYY')
>             DISPLAY '$END ' NOLINE
>             DISPLAY $END
>
>
>
>         do convert-to-dtu-date($End,$ENDYMD)
>
> My display on $End looks good '30-DEC-2001'
> After the attempt at the dtu conversion, I still get
> 30--2001 with an
> invalid month error.
>
>
>
>
> -----Original Message-----
> From: the dragon [mailto:ceprn@hotmail.com]
> Sent: Thursday, January 03, 2002 9:14 AM
> To: sqr-users@list.iex.net
> Subject: Re: date problems
>
>
> Lisa,
>
> I don't have a lot of time to examine this
> completely, but, right off the
> bat, I can tell you Oracle will not see the date
> formats DD-Mon-YYYY and
> DD-MON-YYYY (31-Dec-2001 <> 31-DEC-2001) as the same
> thing.  I think if you
> make the conversion mask the same as the input mask
> you will see different
> results.
>
> clark 'the dragon' willis
> dragon enterprises, consulting services
> "Doing it right the first time, at an affordable
> rate."
>
> PSA: Salary <> Slavery.  If you earn a salary, your
> employer is renting your
>
> services for 40 hours a week, not purchasing your
> soul.  Your time is the
> only real finite asset that you have, and once used
> it can never be
> recovered, so don't waste it by giving it away.
>
> "Time is the coin of your life. It is the only coin
> you
> have, and only you can determine how it will be
> spent.
> Be careful lest you let other people spend it for
> you."
>
> Carl Sandburg
> (1878 - 1967)
>
> ----Original Message Follows----
>
> Oracle 7.3.4
> SQR 4.3.4
>
> Good Afternoon,
>
> I'm trying to subtract 1 day from a value that a
> user keys in.  I've done
> this before in other programs, but for some reason,
> I can't get it to work
> today.
>
> INPUT $BegDate 'Enter begin date (DD-Mon-YYYY)'
> type=char maxlen=11
> IF rtrim($BegDate, ' ') = ''
>     goto Done
> END-IF
>
> let $BDate = strtodate($BegDate, 'DD-MON-YYYY')
> DISPLAY '$BDate ' Noline
> Display $Bdate
>
> do convert-to-dtu-date($BDate,$DATE_OUT)
>
>
>
> The output for $DATE_OUT is 2001--24.  It's leaving
> the month DEC out.  I
> can't for the life of me figure out why.
>
> Any help is GREATLY appreciated!!!!!
>
> Lisa Shipley
> Senior Programmer
> Sumitomo Electric Wiring Systems, Inc.
> Phone: (270) 782-7397 Ext. 2226
>
>
>
>
>
>
>
>
>
> PSA: Salary <> Slavery.  If you earn a salary, your
> employer is renting your
>
> services for 40 hours a week, not purchasing your
> soul.  Your time is the
> only real finite asset that you have, and once used
> it can never be
> recovered, so don't waste it by giving it away.
>
> "Time is the coin of your life. It is the only coin
> you
> have, and only you can determine how it will be
> spent.
> Be careful lest you let other people spend it for
> you."
>
> Carl Sandburg
> (1878 - 1967)
>
> NOTICE:  The information contained in this message
> is protected under United
>
> States and international copyright laws and is
> intended for the personal and
>
>
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com