DaleWatson123321
Programmer
Does anyone have a “formatting” solution to getting the Date to show on the first line and the Time on the second line (in the same cell) ?
Here’s what I’ve done...
First, checking off “Wrap text” under Alignment does not work (no surprise as the date is a number).
With the following formula, I get the proper results, but this means having to place the date/time in a separate cell and apply the formula and/or use VBA to convert the date/time to text.
=TEXT(M3,"mm/dd/yy")&CHAR(10)&LOWER(TEXT(M3,"h:mm AM/PM"))
My preference, would be to “get Excel to do the work” (automatically) – by using a “format” – thus my original question – Does anyone have a “formatting” solution – perhaps a special character for use in a custom format ?
Using the following “custom” format, I’ve been able to get Excel to split the date/time onto 2 lines – but it doesn’t work properly… “mm/dd/yy”, followed by <Alt> 010 (which produces a hard return), followed by “h:mm AM/PM”.
With Ariel font at 8 point, the date by itself displays and prints properly with a cell width of 6. Therefore, using the above format, it “should” be possible to get the date/time to display and print properly in a column width of 6.
Here’s what happens… The date/time will only display (properly) at a width of 11.43 (but creating a lot of wasted space). With a width < 11.43, Excel displays the ##### characters.
Even at the width of 11.43, Excel still causes a problem by printing the ##### characters (even though the date/time displays properly). To get Excel to print the date/time (with the extra wasted space), the cell width has to be increased to 13.4.
I hope someone has come up with a “formatting” solution, and will share it with the rest of us. It’ll be much appreciated.
Regards, ...Dale Watson dalwatson@gov.mb.ca
Here’s what I’ve done...
First, checking off “Wrap text” under Alignment does not work (no surprise as the date is a number).
With the following formula, I get the proper results, but this means having to place the date/time in a separate cell and apply the formula and/or use VBA to convert the date/time to text.
=TEXT(M3,"mm/dd/yy")&CHAR(10)&LOWER(TEXT(M3,"h:mm AM/PM"))
My preference, would be to “get Excel to do the work” (automatically) – by using a “format” – thus my original question – Does anyone have a “formatting” solution – perhaps a special character for use in a custom format ?
Using the following “custom” format, I’ve been able to get Excel to split the date/time onto 2 lines – but it doesn’t work properly… “mm/dd/yy”, followed by <Alt> 010 (which produces a hard return), followed by “h:mm AM/PM”.
With Ariel font at 8 point, the date by itself displays and prints properly with a cell width of 6. Therefore, using the above format, it “should” be possible to get the date/time to display and print properly in a column width of 6.
Here’s what happens… The date/time will only display (properly) at a width of 11.43 (but creating a lot of wasted space). With a width < 11.43, Excel displays the ##### characters.
Even at the width of 11.43, Excel still causes a problem by printing the ##### characters (even though the date/time displays properly). To get Excel to print the date/time (with the extra wasted space), the cell width has to be increased to 13.4.
I hope someone has come up with a “formatting” solution, and will share it with the rest of us. It’ll be much appreciated.
Regards, ...Dale Watson dalwatson@gov.mb.ca