Date formats in conversions

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

Date formats in conversions

Post by Jeff_Fried_(Guest) » Sat Jan 31, 2009 12:14 pm

If you place a date field on a report, you have many options for formatting the date (Feb 5, 02/05/09, 2/5/2009, etc.).____However, if you have a converted date, such as "Today is "+dtoc(date()), the automatic format is whatever the Windows setting is.____How can you force the format to be one of the desired formats, such as mm/dd/yy?____I sort of recall a way to do it by first placing the date field on the report in the selected format, then the converted format with take on that format. I tried this, and it doesn^t work. Was it there in a previous version of R&R and not now, or is there another way to do it?____Jeff

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

=> RE: Date formats in conversions

Post by kfleming » Thu Feb 05, 2009 3:26 pm

DTOC uses the control panel date setting that was in force when the report was created. You can create a UDF if you want that does the string manipulation to get the converted date into the format that you want and then use the custom UDF in place of the DTOC function. That way you have full control of what happens.____Kathleen__R&R Support

Jeff_Fried_(Guest)
Posts: 55
Joined: Tue Oct 10, 2017 12:44 pm

==> RE: Date formats in conversions

Post by Jeff_Fried_(Guest) » Fri Feb 06, 2009 9:44 am

Sounds like the way to go. I just thought there was a time when I was able to do this by formatting a true date on the form, then the dtoc conversion would take on that format.____Thanks.____Jeff

Post Reply