Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]Converting DateTime field To just MM/YYYY
Go
New
Search
Notify
Tools
Reply
  
[CLOSED]Converting DateTime field To just MM/YYYY
 Login/Join
 
Silver Member
posted
I tried using HDate to get my DateTime to only MDYY and then used the EDIT function to manipulate the date to MM/YYYY with no success.
Any further guidance is greatly appreciated.

This message has been edited. Last edited by: <Emily McAllister>,
 
Posts: 31 | Registered: November 17, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Look at the datetime functions in this link

In particular you might want to consider HDATE and then pop the result in a field with MYY format.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5604 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Virtuoso
posted Hide Post
You could use HPART(datetime, 'component', output) to get the specific parts of the datetime field like Month, Year Day, et cetera.


WebFOCUS 8206, Unix, Windows
 
Posts: 1673 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Master
posted Hide Post
You could still use EDIT, but you'll have to use it twice: Once to convert from numeric to alpha and then again with a mask to extract the date.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Reply With QuoteReport This Post
Master
posted Hide Post
If this is a field a sql database, try adding a row to the master that defines the field as a date instead of a datetime field. I do it all the time.
  FIELD=AS_BEGDTTM  , STRT_DT           , HYYMDS, HYYMDS            ,$
  FIELD=AS_BEGDT    , STRT_DT           , YYMD  , DATE              ,$


then print AS_BEGDT like this:
 PRINT AS_BEGDT/MYY


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 923 | Location: Oklahoma City | Registered: October 27, 2006Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]Converting DateTime field To just MM/YYYY

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.