PDA

View Full Version : inserting a character /


ABC123

lbrady
02-28-2005, 10:05 AM
Hi, Could someone tell me how to insert a "/" between four numbers for eg; 0423 to 04/23, and then to add 2005 as "05" to the end of it.
The problem is I imported a an EXCEL spreadsheet with some dates on them. The dates should be in the mm/dd/yy format, but in the alpha table it will eventually be appended to, it has to be a character field. When I add the table to the database, it adds it as a date field, I convert it to character and it makes all the dates 10/03/05 to 20051003. But i need it to be 10/03/05 in a character format. Thank you in advance, I feel I should know this but am having a mental block.
Larry Bray

Stan Mathews
02-28-2005, 10:28 AM
digits = "0423"
? left(digits,2)+"/"+right(digits,2)+"/"+"05"
= "04/23/05"

"0423" is not a number. It is ac character string composed of digits.