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!

Convert Periods to Dates

Status
Not open for further replies.
Dec 27, 2002
167
US
In a Table I have 2 fields
ACCT_YEAR and ACCT_PERIOD

I would like to convert that data to a Date in the following format mm/1/yyyy to assume it is the first of the month.

I use the concatenate function '&' in the following formula.
____
{ACCOUNT_BALANCE.ACCT_PERIOD} & '/1/' & {ACCOUNT_BALANCE.ACCT_YEAR}
_____
The problem is that I get the Month and Year in Decimal Format i.e. my date is 6.00/1/2003.00

Any suggestions?
 
did you try todate in front of your formula? I'm guessing
 
Try:

ToText({ACCOUNT_BALANCE.ACCT_PERIOD},0) & '/1/' & ToText({ACCOUNT_BALANCE.ACCT_YEAR},0,'')
 
That seemed to work.... I receive data that looks like a date..
6/1/2003 instead of 6.00/1/2003.00

Now I just have to see if the Parameter Fields accept it.

Thanks
 
Date({ACCOUNT_BALANCE.ACCT_YEAR},{ACCOUNT_BALANCE.ACCT_PERIOD},01)

will give you a true date result.

Reebo
Scotland (Sunny with a Smile)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top