Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] DATEDIFF IN SQL SERVER AND DATEDIF IN WEBFOCU

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] DATEDIFF IN SQL SERVER AND DATEDIF IN WEBFOCU
 Login/Join
 
Silver Member
posted
Hi

I am facing issue with function in SQL vs iWay DM

--SQL Function (Microsoft SQL)
SELECT DATEDIFF(M,'2014-08-31','2015-03-03')
--iWay Function
DATEDIF('2014/08/31','2015/03/03','M')

However SQL Return 7, and iWay Function return 6

When I am passing value from record set in iWay it seems that DATEDIF('2014/08/31','2015/03/03','M') is used by iWay and return 7

However if I test DateDif function in iWay with below parameter
DATEDIF(2014/08/31,2015/03/03,'M')
This returns 7

So, In iWay DM
DATEDIF('2014/08/31','2015/03/03','M') - Return 6, and this
DATEDIF(2014/08/31,2015/03/03,'M') - Return 7

Please Help, Thanks

This message has been edited. Last edited by: Tamra,


Virul Patel
Product :
iWay Data Migrator (8.1)
WebFocus 8.1
SQL SERVER 2012
 
Posts: 32 | Location: Cambridge, Ontario, Canada | Registered: June 02, 2014Report This Post
Silver Member
posted Hide Post
Don't Know

If someone has better answer. I tried below on Transformation and it worked.

DB_EXPR( DATEDIFF(MM,T2.EFFECTIVEDATE,T2.EXPIRATIONDATE) );

[SOLVED]
Thanks,


Virul Patel
Product :
iWay Data Migrator (8.1)
WebFocus 8.1
SQL SERVER 2012
 
Posts: 32 | Location: Cambridge, Ontario, Canada | Registered: June 02, 2014Report This Post
Guru
posted Hide Post
Virul,

Thank you for your update. Your idea is probably just as good as any. The purpose of DB_EXPR is to utilize SQL logic within WebFOCUS.

There is a DB_EXPR function that allows the use of a SQL expression that will
be passed to the relational database to do the aggregation. For information,
refer to chapter 3 on page 133: "DB_EXPR Function: Inserting an SQL Expression
Into a Request" in the: "WebFOCUS New Features Version 7 Release 7.05" manual
(DN4500997.1013) at:
http://documentation.informati...ml/html_wf_7705/77sn
f/7705snf.pdf
(Please note the above URL spans multiple lines.)

This chapter talks about putting a SQL function in a request that is then
passed over to the database engine.


There are not a lot of DATEDIFF function posts in the iWay forum but lots of different ways to use this if you search within the WebFOCUS Forum. Its really a matter of how you are using it.

I will mark the topic solved in the subject line.


WebFOCUS 8x - BI Portal, Developer Studio, App Studio, Excel, PDF, Active Formats and HTML5
 
Posts: 487 | Location: Toronto | Registered: June 23, 2009Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] DATEDIFF IN SQL SERVER AND DATEDIF IN WEBFOCU

Copyright © 1996-2020 Information Builders