DateTime Format on remote machine
-
Hi everyone, I am trying to develop an app which should read date info from a remote machine (which has MS win on board). My problem is: I don't know the CurrentCulture of the remote machine and therefore I don't know which is the DateTime format of the dates I retrieve. If I get some special dates, for example 02/01/06, I wouldn't know which one represents the day, month or year. Is there any way to retrieve the culture or just the datetime format of the remote machine? N.B. just keep in mind that I only know the IP address of the remote machine and I'm not allowed to deploy any component on it
-
Hi everyone, I am trying to develop an app which should read date info from a remote machine (which has MS win on board). My problem is: I don't know the CurrentCulture of the remote machine and therefore I don't know which is the DateTime format of the dates I retrieve. If I get some special dates, for example 02/01/06, I wouldn't know which one represents the day, month or year. Is there any way to retrieve the culture or just the datetime format of the remote machine? N.B. just keep in mind that I only know the IP address of the remote machine and I'm not allowed to deploy any component on it
When you get the date in any format (which you don't know) convert it to the format you want. for example you've got 01/03/06 => convert it to yyyy/M/d it will innerly will convert to 2006/Mar/01 (if you considered that the fomat of 01/03/06 is d/m/y) Faris Madi Nothing Comes Easy (N.C.E.)
-
When you get the date in any format (which you don't know) convert it to the format you want. for example you've got 01/03/06 => convert it to yyyy/M/d it will innerly will convert to 2006/Mar/01 (if you considered that the fomat of 01/03/06 is d/m/y) Faris Madi Nothing Comes Easy (N.C.E.)
-
Hi everyone, I am trying to develop an app which should read date info from a remote machine (which has MS win on board). My problem is: I don't know the CurrentCulture of the remote machine and therefore I don't know which is the DateTime format of the dates I retrieve. If I get some special dates, for example 02/01/06, I wouldn't know which one represents the day, month or year. Is there any way to retrieve the culture or just the datetime format of the remote machine? N.B. just keep in mind that I only know the IP address of the remote machine and I'm not allowed to deploy any component on it
vilmer wrote:
am trying to develop an app which should read date info from a remote machine
How are you doing this?? Are you using a compponent on the remote machine that you wrote? Dave Kreskowiak Microsoft MVP - Visual Basic
-
vilmer wrote:
am trying to develop an app which should read date info from a remote machine
How are you doing this?? Are you using a compponent on the remote machine that you wrote? Dave Kreskowiak Microsoft MVP - Visual Basic
The remote machine hosts a scada system and I can manage some APIs to exchange data with it. The remote machine comes as is, so I can't install any other component on it. I just have this library to communicate with it and the function defined in my library returns me a string
-
The remote machine hosts a scada system and I can manage some APIs to exchange data with it. The remote machine comes as is, so I can't install any other component on it. I just have this library to communicate with it and the function defined in my library returns me a string
In that case, you're on your own. You'll have to consult with the docs on the API to find out if the datetime your getting is in any specifal format, not culture specific, or it it'll give you the culture info. I'm doubting it though. Dave Kreskowiak Microsoft MVP - Visual Basic