vxml element in ssml - attributes

i m just stuck with a vxml element in an ssml file in tropo. tropo does not recognize
interpret="time" and i have to put interpret="vxml:time".
But I need to also define the format attribute format:"hms12". so i write this:
<say-as interpret-as="vxml:time" format="hms12">243P</say-as> </s>
but it keeps pronouncing it like three integers.
i searched everywhere for the right syntax but couldn't find something.

I believe that is the default format for Tropo. Leave out the format attribute and make format your value as "0243p" for 2:43 PM, instead of "243P" as you have it. If you do not have your value in the exact format from the source of the data I would just convert it to this format rather than trying to force Tropo to conform to its format.

Related

String Foramting vb.net

i want to display date value like '2020/03/30' as '20200330'
i tried this code
Date.Now.Year & Date.Now.Month & Date.Now.day
but this returns 2020330
how can this return 20200330 ??
You are concatenating numbers, which get implicitly converted to strings.
You could check out Custom date and time format strings.
In your case, this might do just fine: Date.Now.ToString("yyyyMMdd")
By the way, as #jmcilhinney already commented to your question, you could easily find such basic information by using your favorite search engine on the internet...

Convert strings of varying pattern to date

In our date column, there are so many different types of string. I am having trouble to convert all those to date type since patterns are not worked on DD-MM-YYYY and MM-DD-YYYY.
12/14/2015 MM/DD/YYYY;
19/07/2016 DD/MM/YYYY;
23.04.2016 DD.MM.YYYY;
1-6-2016 M-D-YYYY;
5-15-2016 M-DD-YYYY;
30-10-2016 DD-MM-YYYY;
8-6-2016 M-D-YYYY;
Or is there a more convenient way to do this?
There is no way at all to do this.
8-6-2016 et al are irretrievably ambiguous without meta information. There is nothing to tell us which is month and day. If you have additional meta information available (did you save the pattern?), there might be a way out of this. Else, your case is lost.
Like a_horse commented: should have been data type date all along.

Get Date/Time Pattern in ICU4J

I have a requirement where I need the pattern ICU uses to format the given date/time.
For example: If I have something like DateFormat.getDateInstance(DateFormat.SHORT, en_US).format(currentDate) gives me 5/3/2015, then I need an API which can tell me that the pattern ICU4J internally using is d/M/yyyy.
I did figure out a solution, all you need to do is convert the DateFormat into a SimpleDateFormat and call toPattern().
((SimpleDateFormat)DateFormat.getDateInstance(DateFormat.SHORT, en_US)).toPattern() returns d/M/y which is what I almost needed.

DateTimeFormat with Timezone and no colon

I am using Talend Open Studio to fetch info from a DB to an XML file and then using XSLT on that.
There is a date field that comes into the XML as: 2013-02-13T16:49:51.733+0230, when I supply a Date Pattern: "yyyy-MM-dd'T'HH:mm:ss.SSSZ".
I believe SimpleDateFormat has this limitation of not able to deal with colon.
I need the colon in between the timezone value: +02:30. How can I achieve that? Is there a different Pattern String that I can use? If not, can I do it in my XSL Transform?
Function format-dateTime() looks for current-dateTime() format which needs colon between time zone HH:MM, in your case it is missing (0230). You should use another method to put colon between them:
let $x:= "2013-02-13T16:49:51.733+0230"
return concat(substring-before($x,'+'),'+',substring(substring-after($x,'+'),1,2),':',substring(substring-after($x,'+'),3,2))
output:
2013-02-13T16:49:51.733+02:30

ABAP startRFC.exe UTF-8 diacritics text transfer

I have a function module (FM) in SAP and I call it externally using startRFC. The only output of FM is one internal table. This table has only 1 column of type char(100) and I need to get it to text file. StartRFC works well, but if there is diacritics (for example Czech language: ěščřžýáíé) instead of these characters only hashes # appear.
Have someone ever solved similar issue?
If I call the same algorithm manually and write strings on screen in SAP, everything is ok. But startRFC somehow destroys it. The problem may be in the data transfer between SAP and startRFC. But I don't know how this transfer works.
I found a solution but it is terribly slow. It converts string to hexadecimal string using "gcl_conv_to_x->write" and "gcl_conv_to_x->get_buffer" than calls "SCMS_XSTRING_TO_BINARY" and you need a binary table. But it takes 5minutes to do all this stuff. Without this conversion my algorithm takes 15 seconds.
So finally a solution...
You need to create XSTRING variable and fill it with your text. To convert STRING to XSTRING use FM: SCMS_STRING_TO_XSTRING.
Then you will need an internal table with row type BAPICONTEN. It already contains component (column) of type SDOK_SDATX (RAW 1022).
And you just append a new line to this table like this:
data: my_table_row LIKE LINE OF my_table.
my_table_row-line = my_xstring.
APPEND my_table_row INTO my_table.
This table (my_table) can be returned via RFC and will contain Cyrillic, German characters etc..
I am just a beginner, so do not ask me how to create the table, please :)

Resources