cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Converting a date to a string

Former Member
0 Likes
188

Post Author: ralc002

CA Forum: Formula

I have done a quick search of the forums but did not find what I needed so here it goes:

I have a date field (which is really a date time field - sql). I only use the date so the time is always 00:00:00

Now I have a formula which shows "The last stored date is " & ToText()" Obviously doing that would show the time (00:00:00). Now I realize that I could format it to exclude the time (e.g. ToText(,"dd/MM/yyyy"), but the problem is doing that hard codes the format. If I create a report for international use, the date format I used in the example would not be valid in the US for example, since it is in british format.

Is there a way to convert a datetime field to a string so that only the date (and not the time) is displayed in the proper format for the current locale?

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Post Author: SKodidine

CA Forum: Formula

How about just

"The last stored date is " & date()

and that way no matter who sees the report, their local settings will determine how the date is displayed.