Dates

Robert J.M. Edis robert.edis@creatcomp.com
Wed, 12 May 1999 13:55:58 -0400


G'day Arnone

I don't know if I understand your issue fully but here is a stab at it
anyway:

DEFINE d_cur_year ZONE*4 = DATEEXTRACT(SYSDATE,YEAR)
DEFINE d_cur_mth ZONE*2 = DATEEXTRACT(SYSDATE,MONTH)
DEFINE d_new_mth ZONE*2 = d_cur_mth - 2 &
  IF d_cur_mth GE 2  ELSE d_cur_mth + 10
DEFINE d_new_year ZONE*4 = d_cur_year &
  IF d_cur_mth GE 2  ELSE d_cur_year - 1
ITEM dateitem = (d_new_year * 10000) + (d_new_mth * 100) + 01

Blue

> -----Original Message-----
> From:	Arnone, Anthony [SMTP:aarnone@grey.com]
> Sent:	Wednesday, May 12, 1999 1:54 PM
> To:	'powerh-l@lists.swau.edu'
> Subject:	Dates
> 
> Good Afternoon,
> 
> 	I am using 8.19 on an HP3000. I have a date field which is YYYYMM. I
> need to run a QTP procedure to update this field every morning. It needs
> to
> be 2 months less than the current date. The problem Im having is when the
> year 2000 comes around. Thank you for your help in advance.
> 
> 
> 					R/S
> 					Anthony
> 
> = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> =
> Subscribe: "subscribe powerh-l" in message body to
> majordomo@lists.swau.edu
> Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
> powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
> This list is closed, thus to post to the list, you must be a subscriber.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.