Date Problem in SL
-
I am displaying date in my .XAML page In .XAML.VB e.g variablename = date.now() But it is returning my client date. i want to display server date.
One person's data is another person's program. --J.Walia
You'd have to call a method on the server side through a WCF call. Be aware, though, that because of latency issues, the value that you receive would be the time that the server received and processed the request, and then by the time the message was transmitted back there would be extra latency involved.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
-
You'd have to call a method on the server side through a WCF call. Be aware, though, that because of latency issues, the value that you receive would be the time that the server received and processed the request, and then by the time the message was transmitted back there would be extra latency involved.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
-
I already told you. Use WCF.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
-
For many applications they in fact use the database datetime for being consistent. in Oracle this could be
Select getdate() from dual;
I believe.V.
V. wrote:
in Oracle this could be Select getdate() from dual
No it isn't - Oracle uses select sysdate from dual. Why would you consider doing this though? If you have a web server, then the application has access to the server time anyway, why on earth would you expect it to make an unnecessary call to a database. Bear in mind that the db connection might need to be created which is an expensive operation and database connections should not be squandered on trivial tasks like this; it it's a high traffic site then this is an unnecessary waste of resources. Supplying the date in this format should only be used when attempting to perform an operation on the database, e.g. an insert or update.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
-
V. wrote:
in Oracle this could be Select getdate() from dual
No it isn't - Oracle uses select sysdate from dual. Why would you consider doing this though? If you have a web server, then the application has access to the server time anyway, why on earth would you expect it to make an unnecessary call to a database. Bear in mind that the db connection might need to be created which is an expensive operation and database connections should not be squandered on trivial tasks like this; it it's a high traffic site then this is an unnecessary waste of resources. Supplying the date in this format should only be used when attempting to perform an operation on the database, e.g. an insert or update.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
I wasn't 100% sure about the select statement, it might very well have been select sysdate from dual; You can argue about the design, but the concept of taking the database datetime does exist. I never said I was pro or con. If you use more then 1 webserver you also need additional setting up for making sure the time is equal (granted this can be done via time synchro eg).
V.