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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Truncate dates 1

Status
Not open for further replies.

sssu

Technical User
Sep 24, 2003
23
0
0
AU
Hi,

Can somebody please help?

I have a date of the form YYYYMMDD and a FY end date of YYYYMM.
Is there any way of cutting the period date to be of the form YYYYMM so I can match it with the FY end date?

Thanks and much appreciated.
 
Hi sssu,

It depends on the data types of your dates. If they are strings, you can just use Left (or other substring functions). If they are numbers you can either do some arithmetic or convert them to strings (with Str or Format). If one or other is a Date variable, probably the easiest thing to do is to use the Format function which converts them into strings containing the elements you specify. You can look in the Help File for full details of all theses functions.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top