I use EAServer 4.1.3 build 41316 and PowerBuilder Virtual Machine (PBVM)
8.0.3 build 9704 on Sun Solaris platform. The date format returned from
PowerBuilder component running on the EAServer is always mm/dd/yyyy, but
what I want is dd/mm/yyyy. Is there any way to change this date format?
In the example below, I pass a string with a date (inputDate) in the
format dd/mm/yyyy to a PowerBuilder component, and then run the function
IsDate(inputDate) which returns FALSE.
Example:
// This prints mm/dd/yyyy and should be dd/mm/yyyy
of_Debug( "System Date Format:" + String( Today() ) )
of_Debug( "Input Date:" + inputDate )
// The IsDate() function returns false.
IF Not IsDate( inputDate ) THEN
IF IsNull( inputDate ) THEN inputDate = "{null}"
of_Trace( "The input date '" + inputDate + "' has an invalid date
format." )
ELSE
......
......
I have tried to set the locale variable LC_TIME to en_AU, but the output
of String(Today()) from a PowerBuilder component to a log file is still
in the mm/dd/yyyy format.
The PowerBuilder component also returns several structures with fields
specified as dates, these are then invalid when returned to the client
as the date format of dd/mm/yyyy is expected from the client. The dates
are needed to be consistent across Windows and Sun Solaris platforms.
This problem only happens on the Sun Solaris platform because on
Windows, the short date format can be specified as dd/mm/yyyy in the
Regional Settings.
Has anyone encountered similar problem before? Any pointer or
information is greatly appreciated. Thank you very much for your kind
attention.
Thanks and Best Regards,
Monica
P.S. Do you have a PBVM 8.0.3 on Sun Solaris, in my knowledge only the PBVM
8.0.2 is available for Sun Solaris, isn't it ?
Gert
On Wed, 26 Feb 2003 11:39:34 +0800,
in sybase.public.easerver.powerbuilder
Bob Bailey
Unisys
"Van der Straeten Gert" <no_spam_gert....@eib.org> wrote in
message news:8NRrC3X...@forums.sybase.com...
we had similar problems with PBVM 7.0.3 on Solaris (german / american
dateformat). Sybase Support comfirmed the problem and opened a Change
Request (CR 292058). This CR is now closed. I think there will be no real
solution for our problem, just a workaround.
The text of the CR:
Components require german format "dd.mm.yyyy" strings. When they are
converted using the date() function the conversion to the Solaris system
format m/d/yy is not correct. Eg. a date "06.07.2001" is converted to
6/7/01 which is wrong. Workaround: Use date format as parameter and convert
to string, eg. using a format. See also CR 229146 January 14, 2003 This CR
was reviewed and closed as part of the Quarterly CR Review process. It is
"Not targeted for any future release".
Greetings
Thomas