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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Format problem 1

Status
Not open for further replies.

ElaineRC

Programmer
Jan 20, 2005
7
GB
I have a problem where I am setting my date fields to have a custom format of ddMONyy eg 10Jun05 which works fine in the Uk & the US but in Japan the format is overridden and the dates come out like this: ddmyy eg 10605. Any ideas why this happens and how I can stop it?

Many thanks
 
Do you mean that copies of the report are being run on different machines in different countries? If so, they probably have different defaults set for the date. For Crystal 10, you can find this and reset it using File > Options > Fields and adjusting the date default.

Doing this to the machine in Japan will change other reports, of course. If this is a problem, you can individually format dates, as ToText({Your.Date}, "ddMMMyy". Long-winded but safe.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Incase anyone has the same problem this is the solution....

(you only need to do this once in your VB.net project)

If System.Globalization.CultureInfo.CurrentCulture.LCID.ToString = 1041 Then
CrystalDecisions.Shared.SharedUtils.RequestLcid = 2057
End If

1041 is the locale id for Japanese
2057 is the locale id for English (UK)
All IDs are here:
Thanks for your help ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top