Partly you have to do that yourself, while running the Control Panel applet for those settings.
"Good old DOS" did'nt have that problem. To solve your problem, here's a piece of code to run in PowerBasic for Dos (version 3.50)
Modify your Regional Settings according to the resulting information.
BTW: For those who don't have PBDOS, please e-mail me at: [email protected] and I'll send you an executable.
Code:
' Source code: PowerBASIC for DOS ' ' Author: [email protected] ' Copyright status: Public Domain ' FUNCTIONs to get country code and ' country specific delimiters for date, time and numbers $COMPILE EXE ' ----------------------------------------------------------------------- ' CountryInfo - returns a string with the following information: ' First byte (= string's ASCII) is either 0, 1 or 2 ' 0: date format = mdy (American) ' 1: date format = dmy (European) ' 2: date format = ymd (Asian or Japanese) ' Char 8: country specific decimal point ' Char 10: thousand separator ' Char 12: date separator ' Char 14: time separator FUNCTION CountryInfo AS STRING buffer$ = SPACE$(64) ' prepare buffer REG 8, STRSEG(buffer$) ' DS = segment REG 4, STRPTR(buffer$) ' DX = offset REG 1, &H3800 ' AX = service CALL INTERRUPT &H21 FUNCTION = buffer$ ' buffer filled END FUNCTION ' main CLS buff$ = CountryInfo code% = REG(2) formt% = ASC(buff$) dd$ = MID$(buff$, 12, 1) pbDate$ = DATE$ REPLACE "-" WITH dd$ IN pbDate$ PRINT "Your country code is: "; TRIM$(STR$(code%)) PRINT "The date delimiter in your country is: "; CHR$(34, 32); dd$; CHR$(32, 34) SELECT CASE formt% CASE 0 PRINT "Date format is: MM DD YYYY" CASE 1 PRINT "Date format is: DD MM YYYY" pbDate$ = MID$(pbDate$, 4, 3) + LEFT$(pbDate$, 3) + MID$(pbDate$, 7) CASE 2 PRINT "Date format is: YYYY MM DD" pbDate$ = MID$(pbDate$, 7) + dd$ + LEFT$(pbDate$, 3) + MID$(pbDate$, 4, 2) END SELECT PRINT "So a short date in Windows should look like this: "; pbDate$ END
[This message has been edited by Egbert Zijlema (edited July 17, 2000).]
Leave a comment: