Hi All,
Iam not an expert with handeling dates,
and all my programming projects where either server-side (where date is not an issue because programs are centralized) and client-side where the project didnt depend on the date a lot.
But now its different with me,
Im working on a project that its core depends on the date, and unfortunatly its client-side,
and its killing me to have to think of how to handle the date when the system date format changes...
And thats a problem, because the date the i try to handle is string,
meaning, if the system date format wasnt close (if not exactly) the same as the date string format, then i get thrown by limitless of errors and exceptions.
and of course, thanks to Microsoft, they didnt make a good DateValue or Date.Parse Functions...
let me give you an example of my frustration:
if the system date format is YY-MMM-DD
and i try to get the date value of a string that is formated the same as the system date format, i will get an error,
i did some testings, and found that, even the system date format is DD-MMM-YY, but DateValue will only read it as DD-MMM-YY
while in other situations, DateValue will only read strings if they match the system date format.
I cant find anything useful online that will help me at least understant how the date work on Windows,
and help me control it instead of it controling me...
BTW, i had worked on a function that will convert a date string to a certain format to be used else where (similar to the Format Function, but the date type can be string)...The reason i did this because i discovered that DateValue will be able to handle date in this format YYYY-MM-DD, even if the system date format is different...
But implementing it in programs seemed to be painful...
Bottom line, does anybody have any advice on how to handle dates while system date format is very much likely changable, and the date im handeling is string type????
Anything is appreciated,
Thanks in advance,
BTW, if im not the only one frustrated because of the date issue, then i will be more than happy to join a small team to create the ultimate date function that will give you the exact results regardless the system date format and regardless of the date type you are trying to handle...
Best Regards
Firas S Assaad
Iam not an expert with handeling dates,
and all my programming projects where either server-side (where date is not an issue because programs are centralized) and client-side where the project didnt depend on the date a lot.
But now its different with me,
Im working on a project that its core depends on the date, and unfortunatly its client-side,
and its killing me to have to think of how to handle the date when the system date format changes...
And thats a problem, because the date the i try to handle is string,
meaning, if the system date format wasnt close (if not exactly) the same as the date string format, then i get thrown by limitless of errors and exceptions.
and of course, thanks to Microsoft, they didnt make a good DateValue or Date.Parse Functions...
let me give you an example of my frustration:
if the system date format is YY-MMM-DD
and i try to get the date value of a string that is formated the same as the system date format, i will get an error,
i did some testings, and found that, even the system date format is DD-MMM-YY, but DateValue will only read it as DD-MMM-YY
while in other situations, DateValue will only read strings if they match the system date format.
I cant find anything useful online that will help me at least understant how the date work on Windows,
and help me control it instead of it controling me...
BTW, i had worked on a function that will convert a date string to a certain format to be used else where (similar to the Format Function, but the date type can be string)...The reason i did this because i discovered that DateValue will be able to handle date in this format YYYY-MM-DD, even if the system date format is different...
But implementing it in programs seemed to be painful...
Bottom line, does anybody have any advice on how to handle dates while system date format is very much likely changable, and the date im handeling is string type????
Anything is appreciated,
Thanks in advance,
BTW, if im not the only one frustrated because of the date issue, then i will be more than happy to join a small team to create the ultimate date function that will give you the exact results regardless the system date format and regardless of the date type you are trying to handle...
Best Regards
Firas S Assaad