I have a issue with formatDate in w2ui - date-formatting

Help please .....What's wrong ?
In Linux or Windows, Chrome or Firefox
if in console, I run:
w2utils.formatDate('2016-07-12', 'd/m/y');
Return 11/7/2016 ( not 12/7/2016 !!!! )
I'm in Argentina ( timezone -3 )
Does it have something to do with it ?
Thanks

I had the same issue. My fix was to use momentjs instead.
so instead of this
w2utils.formatDate('2016-07-12', 'd/m/y');
try this:
moment('2016-07-12').format('DD/MM/YYYY');

Related

Issue networkdays value in google spreadsheet

I have created the formula = NETWORKDAYS.INTL(E84,F84) and E84 and F84 are same date -> 2022.9.5. if it is the same date in both columns, it shows the value 1 but it shows the value 0.
It worked before but now it doesn't work.
https://docs.google.com/spreadsheets/d/1dY6gwDIjjxUPTU-4v0j1MqF1sq7YCgHLTH040QMQrHU/edit?usp=sharing
There was an issue and now it's working properly. Here are more details.
If you refresh the document, you can reload the function with the fix.
looks like a bug but here is some quick workaround:
=IF(A2=B2; 1; NETWORKDAYS(A2; B2))

Mongo extract hostname field db.hostinfo

I'm new to Mongo.
I can run db.hostInfo(), and it outputs lots of information, but I just want to see the "system"."hostname" field.
How do i do that ?
Thanks
use
db.hostInfo().system.hostname
Type and hit enter =>
db.hostInfo().system.hostname
This command works on Linux(Ubuntu20.04) and Win10.

How can i show all vertices in orientdb except where #class="movie"?

Hi there i want to show all Vertices except the ones called movie.
my statement so far was
SELECT * FROM V WHERE NOT #class="movie"
but unfortunately the response does not contain any records. can anybody explain this to me ? :) Thank you :)
what version are you using? If I try in 3.0.0 your query work but you have to use "class" :
SELECT * FROM V WHERE NOT #class="movie"
Cool i solved it by using:
SELECT * FROM V WHERE #class!="movie"
thanks for your help Idacrema :)

Symfony doctrine using IS DISTINCT FROM

I'm having a problem with using IS DISTINCT FROM with symfony. In my case I want sth like this
SELECT * FROM table orders AS o WHERE o.orderer_id IS DISTINCT FROM o.operator_id
It works fine if I run by using pgAdmin(Postgresql), but I don't know how to write with symfony doctrine. I tried to search about this, but no result for me, so anyone can help. Thanks in advance.
thanks zerkms, I achieve this by
$queryBuilder->andWhere($queryBuilder->expr()->orX(
$queryBuilder->expr()->andX(
$queryBuilder->expr()->isNotNull('tem.operator'),
$queryBuilder->expr()->andX(
$queryBuilder->expr()->neq('tem.orderer', 'tem.operator'),
$queryBuilder->expr()->neq('tem.enterprise', 'tem.operator')
)
),
$queryBuilder->expr()->isNull('tem.operator')
));

How to format a Decimal column in DB2?

Select totalvalue from user
This DB2 query is giving output like,
00000000000000000000072834.37000,
00000000000000000000147532.26000,
00000000000000000000145485.89000
I'd like to Display it as below,
72834.37,
147532.26,
145485.89
Is that possible in DB2? Thanks in Advance!
VARCHAR_FORMAT function should work in this case. Try out the below query:
SELECT
VARCHAR_FORMAT(TOTALVALUE, 'S99999999999999999999999999.999999')
FROM USER;
Try this:
Strip(CHAR(DIGITS(00000000000000000000072834.37000)),L,'0')
it should give you 72834.37000
Your DECIMAL type is being returned as a CHAR. If you're not doing it, then check your CLI settings for MapDecimalFloatDescribe.