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

Help with a formula 1

Status
Not open for further replies.

cyreports

Programmer
May 12, 2010
89
0
0
US
{?DATE2} is currently set up as a String. I need it to pull the date as yyyyMMdd - is this do-able somehow?


Code:
"05" & LEFT({?BATCHHEADER} & SPACE(30),30) & CSTR(CurrentDate,"yyyyMMdd") & {?DATE2} & LEFT({?JOURNAL} + SPACE(10),10)
 

You probably have your reasons for doing it that way, but wouldn't it be easier on the user to have {?Date2} defined as a date? Then they would pick a date from the calendar control, and that piece of the formula would be:

totext({?Date2},"yyyyMMdd")

Otherwise the user would just type in the string of 20110819 and your current formula would work, subject to the user always typing it in right (which is always dubious).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top