I need to take a date (my control source name is eventbook.bdate) and convert the date to simply a number. In other words, eventbook.dbate might be "10/02/2011". I need to convert it simply to 10022011. After doing that i need to combine it with a name (eventbook.cust).
What i am trying to accomplish is printing a report to a PDF file but i want the file name to be the customer's name + the date. For instance Joe Smoe10022011.pdf. I was trying to accomplish this with the code below, but i can't seem to get the date to change simply to a number without a mismatch error.
set procedure to Print2PDF.prg additive
loPDF = createobject("Print2PDF")
contractemaildate = Month(eventbook.bdate) + DAY(eventbook.bdate) + YEAR(eventbook.dbate)
custcontract = TRIM(Eventbook.cust) + contractemaildate
=messagebox("Could not setup PDF class!",48,"Error")
.cINIFile = "c:\Event Administrator\Print2PDF.ini"
.cOutputFile = "c:\Event Administrator\emailcontracts\" + custcontract + ".pdf"
.cReport = "c:\eveadmin\djpro\contract.frx"
llResult = .Main()
IF!llResult or loPDF.lError
=messagebox("This error ocurred creating the PDF:"+chr(13)+;
I figure this is something easy that I just can't figure out.