Combining fields

Mike Hughes

Registered User.
Local time
Today, 19:02
Joined
Mar 23, 2002
Messages
493
My table has 4 fields which I want to combine into 1

The first field is BATCH_DATE
The second field is SOURCE
The third field is BATCH_NUMBER
The fourth field is RECEIPT_NUMBER
BATCH_DATE returns a date including forward slashes
SOURCE is a one letter character
BATCH_NUMBER is 4 numbers which may start or end in 0
RECEIPT_NUMBER is 3 number which may start or end in 0

Problem
In the BATCH_DATE I don't want the forward slash to be in the results so 12/01/2011 would look like 12012011

BATCH_NUMBER needs to be returned with 4 numbers even if any of the leading numbers are 0

RECEIPT_NUMBER needs to be returned with 3 number even if any of the leading numbers are 0

Anyone have any ideas on how to do this?

Thanks Mike
 
For the date: Format(somedate, "ddmmyyyy")

For the batch: Format(BATCH_NUMBER, "0000")
 
I'll give it a try. thanks
 

Users who are viewing this thread

Back
Top Bottom