Problem with cDate on Win2K server

Results 1 to 2 of 2

Thread: Problem with cDate on Win2K server

  1. #1
    jeff p Guest

    Default Problem with cDate on Win2K server

    We&#039;re migrating an app to win2K from NT that accepts and processess a date entered from a user. The application checks that the string is a valid date using IsDate() and then converts it to a variant-date using the cDate() function.<BR><BR>Anyways, on NT the cDate function would convert something like <BR>cDate("1/2/2001") to January 2nd, 2001 - using M/D/Y as the default date format when both the month and day were &#060;= 12.<BR><BR>On Win2K, cDate is returning February 1st, 2001. It&#039;s defaulting to D/M/Y. <BR><BR>MSDN says that the locale settings on the machine will determine how cDate determines how to convert the string to the date. We&#039;ve checked the locale settings and they are okay. We&#039;ve even gone to the registry and changed the short-date settings to MM/dd/yyyy. Nothing&#039;s working.<BR><BR>Anyways, I don&#039;t want to have to recode my aplpications to parse the string and break out the month, day , and year. We&#039;d like to fix the locale on the machine to match what it does on NT.<BR><BR>This problem is not happening when an administrator is logged onto that machine, in that case it goes back to MM/DD/YYYY. But no matter what we set in the registry or using SetLocale or session.lcid we can&#039;t get the machine to read dates as mm/dd/yyyy when the administrator is not logged into the server. (this problem is a whole different bug in win2K, but it fixes the darn problem)<BR><BR>any insight would be appreciated. Keep in mind I don&#039;t want to rewrite cDate and I&#039;ve already tried manually setting the LCID.

  2. #2
    Join Date
    Dec 1969

    Default suggestion

    It is, I believe, possible to have different locale and date settings for different users.<BR><BR>This might explain why it works the way you expect for Admin and not for others.<BR><BR>Were the correct settings chosen when you installed Win2K, or do you know?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts