Page 1 of 1

DATE formatting

Posted: Mon Oct 09, 2017 8:49 pm
by kno_dk

I have an old WEBEVENT (RDMLX) function where we have a date in a list. Today the format is Now the customer want it to be and they want to keep the leding zero eg 09-10-17. I have created a virtual field tha make the conversion of the data and The field have the Y edit code. It removes the leding zero.
Can I do it with the some kind of formatting the <RDML MERGE="KWORDDV6" FORMAT=4>, edit word(would that work in web) or do anybody have a better solution (some RDMLX code that move the date into a string)?


Re: DATE formatting

Posted: Wed Oct 11, 2017 11:02 pm
by HMJust
If you are just looking for data to string, this has worked for me:

Code: Select all

Define Field(#HMJDATE) Type(*DATE)
#WCHAR8 := #HMJDATE.AsString.Substring( 9 2 ) + '-' + #HMJDATE.AsString.Substring( 6 2 ) + '-' + #HMJDATE.AsString.Substring( 3 2 )