LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to send Date string to a NIWebService

Group,

I would like to set up a vi in web services that will accept a date string ("2/28/2011").  Any idea on how I can encode this string in the URL so that NIWebServices will accept it as a single input rather than 3 inputs?  I have tried to use %2f in place of the forward slashes but no go.  I could use three separate inputs (month,day,year) but I would like a more elegant solution. I figured out the Time portion but I am stuck on the Date.   Any ideas?

 

Thanks

Todd

0 Kudos
Message 1 of 5
(2,678 Views)

Group,

Just adding this for anyone with the same problem. 

I changed the date format to %<%X %b %d,%Y>T.  An example is:10:38:02 PM Feb 28, 2011.  So to submit this as a variable from NI's web service = NIWebService, with the vi = VarTest accepting a string you would call:

http://computername.domainname.com:8080/NIWebService/VarTest/10%3a38%3a02%20AM%20Feb%2028%2c%202011

You should be able to convert this to a Timestamp.

 

I hope that this helps...

Thanks

Todd

0 Kudos
Message 2 of 5
(2,669 Views)

Hello toddho

 

I just wanted to verify with you, have you solved your own issue?  If you could please follow up with me, I'd really appreciate it.  I'd be happy to help you solve this but let me know if it is still a problem to you.

 

Thank you!

 

Greg S.

Sincerely,

Greg S.
0 Kudos
Message 3 of 5
(2,655 Views)

Greg,

Yes that solved it.  Thanks for your intrest.

 

Todd

0 Kudos
Message 4 of 5
(2,647 Views)

Wonderful!

 

Thank you for choosing National Instruments!

Sincerely,

Greg S.
0 Kudos
Message 5 of 5
(2,629 Views)