How to convert xs:date to xs:dateTime tibco - xpath

In my application, there is the following case:I have a "xs:date" and I need to convert it to "xs:dateTime".
I tried tib:format-dateTime("EEE MMM dd zzz
yyyy",concat($Variable0/root/param,'00:00:00')) but it doesn't work. How can write the xpath?

You can use just xsd:dateTime() function : xs:dateTime($Variable0/root/param)
If param type is xsd:date, it will work and the output will be xs:dateTime type.
I'm using Tibco BW6.X and it works for me.

Related

How can I format time output in Power Automate

In my power automate flow, I have an action that give time output in this format: 2022-12-01T18:52:50.0000000Z
How can I take this output and format as yyyy/mm/dd .
I want to use the time output as string for a folder structure.
https://learn.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#formatDateTime
Assuming you have a variable called DateTime, you would create another variable and use this expression ...
formatDateTime(Variables('DateTime'), 'yyyy/MM/dd')
Result
This is pretty straight forward.
Use the Convert datetime to text function
In the Format to use dropdown select Custom
and specify the format how you would like it to appear.
yyyy/MM/hh will give you 2022/12/01
HH-mm-ss will give you 18-52-50

How to convert datetime in 2021-05-24T04:44:56+00:00 format?

In laravel 8 app making request to mailchimp I recieve string datatime in format
2021-05-24T04:44:56+00:00
Which format is it? I can parse it manually, but are there better way to convert it with
carbon(or other tool) ?
Thanks
This is the ISO-8601 format https://en.wikipedia.org/wiki/ISO_8601 it's actually pretty common. The same will be valid in most languages. The native DateTime class of PHP supports it:
$moment = new DateTime('2021-05-24T04:44:56+00:00');
So do Carbon (and all other PHP stuff like strtotime and date-time related libraries):
$moment = new Carbon('2021-05-24T04:44:56+00:00');
$moment = Carbon::parse('2021-05-24T04:44:56+00:00');
You can simply convert it to carbon instance using c format
\Carbon\Carbon::createFromFormat('c','2021-05-24T04:44:56+00:00');
And if you want to convert any carbon instance to ISO 8601, you can use
\Carbon\Carbon::now()->format('c');
You can format your time string using Carbon:
$date = Carbon\Carbon::parse('2021-05-24T04:44:56+00:00')->toDateTimeString();
Output: "2021-05-24 04:44:56"
And also using using strtotime:
echo date("Y-m-d H:i:s", strtotime("2021-05-24T04:44:56+00:00")) . "\n";
That appears to be a local timestring representation. You can 'nicely format' it quite easily with carbon:
Carbon::parse('2021-05-24T04:44:56+00:00')->toDateTimeString();
The above will output:
2021-05-24 04:44:56
There are plenty other formatters available or you can define your own.

syncsort convert pd with precision to zdf

I have a need to convert pack decimal(pd) with precision like S9(8)V99 to zone decimal(zd).
for example: 12345678 should converted like 123456.78
I try to do that by the syntax :
outrec fields=(1,4,pd,zdf,edit=(IIIIII.TT))
but i got a syntax error on the edit phrase
A Google search shows nothing...
What is the correct syncsort syntax?
I solved it .
outrec fields=(1,4,pd,edit=(IIIIII.TT)) do the work

Sonar API search issues

I am trying to get the issues(bug,codesmells) through sonar API by using the following
/sonar/api/issues/search?pageSize=1&projectUuids=AV7s-_ldd2-CFpJxZLc4&types=BUG&createdAt=2017-11-08&resolved=false
Its working well, But what I am looking here is, instead of giving the date manually, Is it possible to pass the date which I will get it from script?
My codes :
wget.download('http://00.00.00.00:9090/sonar/api/project_analyses/search?project=project-id',out='file1.json',bar=None)
data = json.load(open('file1.json'))
date_time=(data["analyses"][0]["date"]).split("'")[0]
date=date_time[0:10]
print date
I need to pass the output(date) to,
/sonar/api/issues/search?pageSize=1&projectUuids=AV7s-_ldd2-CFpJxZLc4&types=BUG&createdAt=date&resolved=false
Any suggestion?
Call api/issues/search with a date format that respect one of the 2 formats:
2017-10-19T13:00:00+0200
2017-10-19

How I can format date in report to appear exactly as I want - RDLC

I have a report in my application and this report will show a long date from db and I used this expression to make it shorter:
=FormatDateTime(Fields!StatementDate.Value,DateFormat.ShortDate)
and the date will show like this : 1/1/2010
I need to make it like this : 2010/1/1
How I can do it?
That expression do the trick
=CDate(Fields!Fecha.Value).ToString("yyyy/M/d")
I think that it is a lot cleaner to use the Format property rather than format it in your expressions:
http://msdn.microsoft.com/en-us/library/ms252080%28v=vs.90%29.aspx
You can use the standard .NET formatting strings.
Value=Fields!StatementDate.Value
Format=yyyy/M/d
Fields!StatementDate.Value will need to be a DateTime, if not you can try convert it:
Value=CDate(Fields!StatementDate.Value)
=CDate(Fields!StatementDate.Value).ToShortDateString()

Resources