Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formating dates to different locales

Status
Not open for further replies.

sumeet22

Programmer
Feb 4, 2005
25
US
Is there any way to format dates to different regional setting i.e. when a user in US runs report the date should show up as 3/23/2005. When a user in UK runs the same report this date should show up as 23/3/2005.

Is there any way to do this ?

I am using Crystal 10.

Thanks.

 
Under [File] on your menu, choose [Options] and then [Fields]. You can set the defaults for your own machine. That's one way.

More reliable - but much more work - is to have a parameter that lets the user say if they want US or UK format. Each date would then come via a Format Field which tests and uses ToText to format the date.

A third possibility is to use Save As to create two versions of each report, and use Paint Format to set each as you wish.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Hi Madawc,

Thanks for your response. I also thought of the 2nd option, pass the locale type from application and handle in in Crystal, which works extremely well. However, for option 1, setting to default for a particular machine, thse reports are used for a .net app as web services. Windows app make calls to these web services. The reports sit on IIS machine which makes it a little tough to get the default being the IIS server located in US, it will grab the local US settings.

At this point I think the only option is the 2nd one.

What do you think ?
Thanks.
Sume.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top