Focal Point
[SOLVED] Date Conversion from A10 to MDYY

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2697004876

September 14, 2015, 04:32 PM
A Fisher
[SOLVED] Date Conversion from A10 to MDYY
I've been wracking my brain trying to get this figured out, and all of the solutions that seem like they should work, aren't. I have a date field recorded as A10 (SQL: Char(10), Master File is A10) in my DB. I am attempting to convert it to MDYY format for filtering purposes.

Source Field called FROM_DATE, A10, '30/12/2015' is the example date.

From what I've been reading:

DATECVT (FROM_DATE, 'A10DMYY', 'MDYY') as a detail (DEFINE) field, or some similar variation, should work.

I keep getting blanks for the converted field.

I'm sure there's something ridiculously simple that I'm missing, but I can't find it. I'm openly welcoming someone to post the solution and make me look stupid!! Sorry if this is a repost, but I've been searching and experimenting all day...

This message has been edited. Last edited by: A Fisher,


WebFOCUS 8.2.0.1 / App Studio 8.2.0.1 (04092014) / Windows 7 / HTML5, PDF, XLS
September 15, 2015, 07:48 AM
Tom Flynn
FROM_DATE/A10 = '30/12/2015';
DATE1/A8MDYY = EDIT(FROM_DATE,'$$$99') || EDIT(FROM_DATE,'99') || EDIT(FROM_DATE,'$$$$$$9999');
DATE2/MDYY = DATECVT(DATE1, 'A8MDYY', 'MDYY');


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
September 15, 2015, 01:43 PM
A Fisher
Thank you very much, Tom Flynn!

This was the exact solution had been after.


WebFOCUS 8.2.0.1 / App Studio 8.2.0.1 (04092014) / Windows 7 / HTML5, PDF, XLS
September 16, 2015, 09:09 AM
Kevin W
Time to recommend the book "(Almost) 1001 Ways to Work With Dates in WebFOCUS" by Price and Perlmutter again.


WebFOCUS 7.7.05 (Someday 8)
Windows 7, All Outputs
In Focus since 1983.
September 17, 2015, 08:51 AM
GavinL
quote:
Time to recommend the book "(Almost) 1001 Ways to Work With Dates in WebFOCUS" by Price and Perlmutter again.


yea, for only $127. Guess they didn't want to sell a lot of them.

http://www.amazon.com/Almost-D...-8-0-2/dp/1626207364



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
September 17, 2015, 10:36 AM
Nicholas Spyrison
or $20 for the WebFOCUS 7 version.

Still not enough readily available content to search for.


_____
WF 8.1.04
Win 7// Windows Server 2012 R2
SASS OLAP Cube
September 17, 2015, 11:06 AM
Kevin W
I got my employer to buy a copy.


WebFOCUS 7.7.05 (Someday 8)
Windows 7, All Outputs
In Focus since 1983.
September 18, 2015, 08:31 AM
trob
Yes, go with the 7 version for $20 http://www.amazon.com/WebFOCUS...rds=webfocus+7+dates

This is an essential reference guide for anyone who is constantly working with date conversions.

Also if there is a date format you are constantly converting to another I would consider placing a function on the server rather than coding it into every fex.


------------------------------------------
DevStudio 8.2.03
WFS 8.2.03
September 23, 2015, 03:39 PM
A Fisher
I had seen this book mentioned before, but saw only the higher priced versions.

Thanks for the reminder and finding the $20 copy!


WebFOCUS 8.2.0.1 / App Studio 8.2.0.1 (04092014) / Windows 7 / HTML5, PDF, XLS