Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RELEASE THE YEAR OUT OF DATE FIELD

Status
Not open for further replies.

ozi2

Programmer
Sep 1, 2002
40
IL
Hi,

I'm using MSSQL and WF 4.36.
I have a date type field and I want to create
a compute field which contains the year of the date field.
I keep getting the same number for different years,
which is not the year but an unknown number.
The master file has the following format for the field: YYMD

Any help is appreciated.
Regards,
OZ
 
Let's suppose TESTDT is your YYMD field. Then the following compute:

ATESTDT/A8YYMD=TESTDT;

should work. Once you get ATESTDT, a simple EDIT will give you whatever parts of the date you want.
 
Hi Oz,

As your date field is stored in YYMD format, you can use the following in a define or compute:

YEAR/YY=DATE;

you can do the same for month or day by changing YY to M or D.

Regards

Tewy
 
hhow do i add to the current yr in my date variable in define. I have
someyr/YYMD and I need to add YY+1 for same MD
Please help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top