[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] String to Date format
Could the problem be that you have &lastdate in your first procedure, but
then you reference $lastdate when you print?
-----Original Message-----
From: Ottaway, Eric (PS, GNF, Contractor) [mailto:Eric.Ottaway@gnf.com]
Sent: Wednesday, October 01, 2003 12:40 PM
To: 'sqr-users@sqrug.org'
Subject: RE: [sqr-users] String to Date format
!****************************************************************
BEGIN-PROCEDURE get_last_time
BEGIN-SELECT
to_date(maxvars.varvalue,'MM/DD/YYYY HH:MI:SS') &lastdate
FROM
[$schema]maxvars
WHERE
maxvars.varname = 'GNF_RCPT_TIMESTAMP'
END-SELECT
END-PROCEDURE
!****************************************************************
BEGIN-PROCEDURE check_date
! LET $lastdate = strtodate($lastdate,'MM/DD/YYYY HH:MI:SS')
PRINT $lastdate (+10,1)!edit 'MM/DD/YYYY HH:MI:SS'
!***************TESTING
BEGIN-SELECT DISTINCT
MAX_RCV_INTERFACE.PONUM &currPO
MAX_RCV_INTERFACE.IMPORTTIMESTAMP &currdates
MOVE &currPO TO $currPO
MOVE &currdates TO $currdates :$DATEMASK
LET $currdates = strtodate($currdates,'MM/DD/YYYY')
PRINT $currdates (+1,1)!edit 'MM/DD/YYYY HH:MI:SS'
!***************TESTING
NEW-PAGE
! LET #diffdate = datediff($currdates,$lastdate,'SECOND')
! SHOW 'CurrDates = ' $currdates
! SHOW 'LastDate = ' $lastdate
! IF #diffdate > 0
! DO Get_Receiving_Ticket_Data
! END-IF
-----Original Message-----
From: Mike Eischen [mailto:MEISCHEN@genesco.com]
Sent: Wednesday, October 01, 2003 2:36 PM
To: sqr-users@sqrug.org
Subject: Re: [sqr-users] String to Date format
Hi Eric,
With strtodate you need to use a format mask which indicates the date format
you want the strtodate function to return, and the format masks vary
depending on what database you're using. What database are you using? Can
you include a code sample showing the syntax?
Thanks,
Mike
>>> Eric.Ottaway@gnf.com 10/01/03 01:08PM >>>
Hey guys and gals,
I'm still having trouble trying to format a string ('06/05/2003 01:03:00)
into a date with the same format. Anyone have any ideas on how to do this?
I've tried using a to_date function and a strtodate function. Both failed.
Thanks,
Eric B. Ottaway
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users