In a Custom Presentation or Report, using this:
CURRENT_TIMESTAMP, MMM dd yyyy h:mm a
Results in: Mar 31 2009 9:58 PM
I need to be able to concatenate a timestamp with some additional text to get a result like: Report #G3000 as of Mar 31 2009 9:58 PM
This needs to be stored in an attribute & not just displayed on a Custom Presentation or Report
Anyone have any ideas?
Storing a time / date
Storing a time / date
Tom - V8.8 build 3137 - MySql / PostGres
Hi Tom,
I'm not sure about your application design but if the data is stored in 1 business object couln't you have a rule something like the following:
test.DateAndText='#'+test.ReportNumber+ ' as of ' + test.DateStamp
Where DateAndText is the stored attribute with the '#' + Report Number + ReportNumber ' as of ' and the timestamp.
Bazar
I'm not sure about your application design but if the data is stored in 1 business object couln't you have a rule something like the following:
test.DateAndText='#'+test.ReportNumber+ ' as of ' + test.DateStamp
Where DateAndText is the stored attribute with the '#' + Report Number + ReportNumber ' as of ' and the timestamp.
Bazar
Tom,
I've not tested it but would something like
Object.Attribute = 'Report '+AS_STRING(Report.number)+'as of '+AS_STRING(CURRENT_TIMESTAMP, MMM dd yyyy h:mm a)
do the job ? (Assumes Object.Attribute is a Plain Text attribute)
It works for the CURRENT_TIMESTAMP (I've used it before) but I haven't tried it with the 'MMM dd yyyy h:mm a' structure before.
Peter
I've not tested it but would something like
Object.Attribute = 'Report '+AS_STRING(Report.number)+'as of '+AS_STRING(CURRENT_TIMESTAMP, MMM dd yyyy h:mm a)
do the job ? (Assumes Object.Attribute is a Plain Text attribute)
It works for the CURRENT_TIMESTAMP (I've used it before) but I haven't tried it with the 'MMM dd yyyy h:mm a' structure before.
Peter
Great -- thanks very much Peter -- it works! I think I tried every possibility except this obvious one
Minor clarification for future readers -- quotes are needed around the time stamp format:
Object.Attribute = 'Report '+AS_STRING(Report.number)+'as of '+AS_STRING(CURRENT_TIMESTAMP, 'MMM dd yyyy h:mm a')
Minor clarification for future readers -- quotes are needed around the time stamp format:
Object.Attribute = 'Report '+AS_STRING(Report.number)+'as of '+AS_STRING(CURRENT_TIMESTAMP, 'MMM dd yyyy h:mm a')
Tom - V8.8 build 3137 - MySql / PostGres