S
Schfooge
I am trying to do a homework assignment, but I am having
troubles due to regional date settings.
Part of the program requires a date to be read from
a sequential file, which gives the date in string format.
The program needs to convert the string to a date.
However, the text file supplied is in US formatting
(eg. "07/24/2001" for July 24,2001 but my computer's
settings are Canadian (24/07/2001"). Now I know that
the easy way out would be to either change the text
file to Cdn format or my computer to US format, but
that will only fix the program so it works on computers
that have the same settings - which seems to me to be
sloppy programming - plus I don't know what the settings
are on the machine that my teacher will be testing my
program on.
What I need to know is whether or not there is any way
that I can force the program to use one country's
format over the other, regardless of the regional settings
of the computer it's running on.
troubles due to regional date settings.
Part of the program requires a date to be read from
a sequential file, which gives the date in string format.
The program needs to convert the string to a date.
However, the text file supplied is in US formatting
(eg. "07/24/2001" for July 24,2001 but my computer's
settings are Canadian (24/07/2001"). Now I know that
the easy way out would be to either change the text
file to Cdn format or my computer to US format, but
that will only fix the program so it works on computers
that have the same settings - which seems to me to be
sloppy programming - plus I don't know what the settings
are on the machine that my teacher will be testing my
program on.
What I need to know is whether or not there is any way
that I can force the program to use one country's
format over the other, regardless of the regional settings
of the computer it's running on.