Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a text box which displays the date from a listbox called 'Reporting_Date_Comp' when a date value is selected.
However, the values are not formatted.
For example, when I select '20130504' from the listbox, it will be displayed as 'Date: 20130504' in my text box.
Is there a way for me to format it such that it will be displayed as 'Date: 04/05/2013' instead?
Below is my working code in the text box:
='Date: ' & Reporting_Date_Comp
='Date: ' & date(Reporting_Date_Comp,'DD/MM/YYYY')
It's possible that Reporting_Date_Comp is not yet a date, just a number. In that case you need:
='Date: ' & date(date#(Reporting_Date_Comp,'YYYYMMDD'),'DD/MM/YYYY')
Actually it would be better to do this conversion in the script.
='Date: ' & date(Reporting_Date_Comp,'DD/MM/YYYY')
It's possible that Reporting_Date_Comp is not yet a date, just a number. In that case you need:
='Date: ' & date(date#(Reporting_Date_Comp,'YYYYMMDD'),'DD/MM/YYYY')
Actually it would be better to do this conversion in the script.
Hi Gysbert,
I did the same formatting before, but it gave me this instead
Date: 22/06/57015
Is it because of its numerical representation?
try this
='Date: ' & date(date#('20130504','YYYYMMDD'),'DD/MM/YYYY')
Replace this with your datefield
I rewrote the script and it works! Thank you