March 21, 200520 yr I have 2 date fields and a notes field that I have to combine with no slashes or dashes or othe marks (for export into another program) This is the format I need to export: mmddyy mmddyy note This is my calculation field Action Date & " " & FollowUp Date & " " & Action Notes This is how the field should look: 020904 021004 client seems to think there is no budget but this is the result I get 731620 731720 client seems to think there is no budget -------- I'm guessing that a date format uses some underlying numerical calculation, because I get a similar result in Excel if I change a "date" format to a Text format. I've tried DateToText, but I still have slashes (and no leading zeroes). If I import into Excel to "find and replace" the slashes, the "dates" changes to that underlying number code. Any ideas? It seemed like an easy problem, and would be, I guess, if the "date" format wasn't just a mask over other numbers. Thanks in advance Cheri
March 21, 200520 yr Author I have 2 date fields and a notes field that I have to combine with no slashes or dashes or othe marks (for export into another program) This is the format I need to export: mmddyy mmddyy note This is my calculation field Action Date & " " & FollowUp Date & " " & Action Notes This is how the field should look: 020904 021004 client seems to think there is no budget but this is the result I get 731620 731720 client seems to think there is no budget -------- I'm guessing that a date format uses some underlying numerical calculation, because I get a similar result in Excel if I change a "date" format to a Text format. I've tried DateToText, but I still have slashes (and no leading zeroes). If I import into Excel to "find and replace" the slashes, the "dates" changes to that underlying number code. Any ideas? It seemed like an easy problem, and would be, I guess, if the "date" format wasn't just a mask over other numbers. Thanks in advance Cheri
March 21, 200520 yr Dealing with converting dates to text can be vexing. I would suggest making two calculation fields (result text) for your two dates. For Action Date: Case (Month [Action Date] < 10, "0" & NumToText [Month [Action Date]], NumToText [Month [Action Date]]) & Case (Day [Action Date] < 10, "0" & NumToText [Day [Action Date]], NumToText [Day [Action Date]]) & Right [NumToText [Year [Action Date]], 2] The Month, Day & Year functions return numbers. The calc tests to see if they are single digit numbers, and adds a leading zero if so. It also converts them all from numbers to text. This is off the top of my head, so I hope I have the right numbner of open & close brackets. Call this ActionDateCalc. Make a similar field for FollowUpDate. Stick both calcc fields off on an All Fields layout where they don't need to be seen. Alter your concatenation above to; ActionDateCalc & " " & FollowUpDateCalc & " " & Action Notes That should do it. Steve Brown
March 21, 200520 yr Dealing with converting dates to text can be vexing. I would suggest making two calculation fields (result text) for your two dates. For Action Date: Case (Month [Action Date] < 10, "0" & NumToText [Month [Action Date]], NumToText [Month [Action Date]]) & Case (Day [Action Date] < 10, "0" & NumToText [Day [Action Date]], NumToText [Day [Action Date]]) & Right [NumToText [Year [Action Date]], 2] The Month, Day & Year functions return numbers. The calc tests to see if they are single digit numbers, and adds a leading zero if so. It also converts them all from numbers to text. This is off the top of my head, so I hope I have the right numbner of open & close brackets. Call this ActionDateCalc. Make a similar field for FollowUpDate. Stick both calcc fields off on an All Fields layout where they don't need to be seen. Alter your concatenation above to; ActionDateCalc & " " & FollowUpDateCalc & " " & Action Notes That should do it. Steve Brown
March 22, 200520 yr Author Thank You - I was going to drop in the calculations for leading zeroes and the 2-digit year AFTER I solved the problem of turning a date into text - I didn't realize that the calculations themselves would solve the problem!! Thank you so much for taking the time to answer! Cheri
Create an account or sign in to comment