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] toDate Function in DQS - change return Format

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] toDate Function in DQS - change return Format
 Login/Join
 
Member
posted
When using the toDate function in Data Quality Suite, i am not seeing a way to control the return format. No matter what format you pass into the function ie: toDate('2014.7.14','yyyy.M.d') or toDate('JUL-2014','MMM-yyyy') or toDate('07/14/2014','MM/d/yyyy')

It will always return the date back in the "Day" format of yyyy-MM-dd (ie: 2014-07-14). Is there any way to change this to still return a date, but in the format we prefer?

I am using this in the Column Assigner step, on a field with a datatype of "Day". Maybe that's why i can't control it?

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 7 | Registered: January 02, 2014Report This Post
Member
posted Hide Post
ToDate coverts a string to a Date type. To format the output of the Date object use toString(yourDate,'yyyy-MM-dd') to return a String representation -- where the 'yyyy-MM-dd' is using Java's SimpleDateFormat syntax.

See below for details on Java SimpleDateFormat:
http://docs.oracle.com/javase/...impleDateFormat.html

Let me know if this helps..

Sincerely,
Craig Sanders
Integrity Solutions Product Manager - DQS/MDS
Information Builders Inc


all things iWay
 
Posts: 8 | Registered: August 13, 2014Report This Post
Member
posted Hide Post
Thanks Craig, its what i suspected, and your reply makes sense. The plan that i created was for a profile, utilizing the Profiling step. I have a field defined as a rollup column and i am passing a string as 'JUL-2014', 'MMM-yyyy' format. The issue i was having was i purposely converted it to a date (using toDate) so that i could order it in my rollup by date. Right now, since its a string, systematically when the fields are rolled up, its in character form and ordered as such in the profile, so 'AUG-2014' comes before 'JUL-2013'. I was trying to think of a creative way to order the strings in date format on a rollup field. If you have any suggestions, please let me know.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 7 | Registered: January 02, 2014Report This Post
Member
posted Hide Post
Try adding an Alter Format where you create a new column.. You can name it whatever you want but in the expression add 'toDate(youStringColumnHere,'MMM-yyyy')'

Now in the profile use this new column instead of your original string date column and it should work.

Let me know how it goes.

Sincerely,
Craig


all things iWay
 
Posts: 8 | Registered: August 13, 2014Report This Post
Member
posted Hide Post
The information Craig gave me handled my issue.
[SOLVED]


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 7 | Registered: January 02, 2014Report 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] toDate Function in DQS - change return Format

Copyright © 1996-2020 Information Builders