[cisco-voip] UCCX scripting string to date format
Mike O
mikeeo at msn.com
Sat Jun 6 12:06:13 EDT 2009
Adam,
This is what I've come up with, its very slow, but works. Is there away to do this in the expression editor?
Set year = s_date.substring(2,4)
Set month = s_date.substring(4,6 )
Set day = s_date.substring(6)
Set date = month+"/"+day+"/"+year
s_date String "20090619"
year String ""
day String ""
month String ""
date Date D[June 5, 2009 10:26:42 PM]
----- Original Message -----
From: Adam Blomfield
To: Mike O
Cc: cisco-voip at puck.nether.net
Sent: Friday, June 05, 2009 3:08 PM
Subject: Re: [cisco-voip] UCCX scripting string to date format
You have to use the string.substring function to break that field out into it's seperate components and then piece them back together again with the slashes into another string, which you can then turn into a date variable. I had to do something similar recently and it works just fine. Let me know if you would like a sample aef.
-Adam
On Fri, Jun 5, 2009 at 1:33 PM, Mike O <mikeeo at msn.com> wrote:
I'm pulling a date from SQL in the following format "YYYYMMDD" (20090619) how can I read this back to the caller? I tried using the set command to change it to DATE type and the script bombs.
Thanks,
Mike
_______________________________________________
cisco-voip mailing list
cisco-voip at puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-voip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20090606/41ff70ed/attachment.html>
More information about the cisco-voip
mailing list