Date Format

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
jmiskey
Posts: 46
Joined: Tue Oct 10, 2017 12:44 pm

Date Format

Post by jmiskey » Thu Feb 17, 2005 10:49 am

I am using Version 10+, Build 10.1.002. I have a date field that I need to convert to a different format than the options listed under Properties. The date need to be in a "mmddyy" format (with no slashes or dashes).____What is the easiest way of doing this?____Thanks.

jmiskey
Posts: 46
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: Date Format

Post by jmiskey » Thu Feb 17, 2005 2:59 pm

I figured out a formulaic way, i.e.____RIGHT(DTOC(DateField,1),4)+SUBSTR(DTOC(DateField,1),3,2)____But I would love to hear if there is an easier way. i.e. a FORMAT function, or the ability to create User Defined Functions.____We had a person who used to work here who wrote some User Defined Functions for the DOS version of RR, but we do not know how to write them or convert them to Version 10.

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

==> RE: Date Format

Post by kfleming » Fri Feb 18, 2005 8:30 am

To turn this expression to a UDF, go to Calculations->User Functions and then select New.____In the Declaration box enter:__mmddyyyy(D_DateField)____and in the expression enter:__RIGHT(DTOC(DateField,1),4)+SUBSTR(DTOC(DateField,1),3,2)____then in any report you can create a calculated field using your new mmddyyyy() function and supplying the date field you want to convert within the parentheses.______Kathleen__R&R Support

Post Reply