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

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

confidential use of the addressee.  If you are not the addressee or an agent

of the addressee, you are hereby notified that you have received this
message in error and that any review, dissemination, distribution, taking of

any action in reliance upon or copying of this message without the express
written permission of the sender or his agent is strictly prohibited and in
violation of referenced statutes.  If you have received this message in
error, please notify me (the sender) immediately and you are instructed to
delete this message from any computer it resides on, including mail servers.

SIGNATURE :
Do not meddle in the affairs of dragons, for you are crunchy and taste good
with ketchup.
You've got to be a Spirit; don't need no Ghosts.
Do or Do Not; There is NO Try.
Any clod can have facts, but having an opinion is an art !
A conclusion is simply the place where someone got tired of thinking.
When a continuing state of defiance and disorder can not be checked by the
rules, then new and sometimes drastic rules must be forged to maintain
order; the alternative is anarchy.
M. Clark Willis III - Sr Systems Analyst, Sr Consultant ceprn@hotmail.com
aolim:ceprn ICQ 6633136

Help stamp out SPAM!! http://www.cauce.org

The senders of unsolicited commercial e-mail to me at any site are liable
for a $500 per message cost under USC 47, which may be found at
http://www.law.cornell.edu/uscode/47
Contents of this message, in it's entirety, (c) 2000 M. Clark Willis III /
Dragon Enterprises inc.  All rights reserved.




_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com