Microsoft Excel - How to pass datetime value to from Excel macro to web service ?

Asked By Anish V on 12-Dec-12 04:39 AM

I'm trying to pass the datetime value from the Excel macro to web service. In web service, its getting some difference in dates.

See my example below:

From Excel sending the date as - 12/2/2012 12:00:01 AM 

Reaching the date in Web Service as - 12/1/2012 6:30:01 PM

Expecting a help.

Thanks in advance,
Harry Boughen replied to Anish V on 12-Dec-12 06:33 AM
Hello Anish,
I suspect that Excel is giving you local time whilst the web service is working in another time zone or on UTC.
Anish V replied to Harry Boughen on 14-Dec-12 01:33 AM
Thanks for your response Harry. You are right. How can we make that same?
Harry Boughen replied to Anish V on 14-Dec-12 02:01 PM
Hello Anish,
I am not sure why and how you want the times to correspond.  You could try adding the time difference to the value in your spreadsheet.
There is some code on Chip Pearson's site about using API calls to convert times to UTC and allow for daylight saving but I am not sure whether that would do what you want.
Sorry I can't be of more help.