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     Date format to String format
Go
New
Search
Notify
Tools
Reply
  
Date format to String format
 Login/Join
 
Gold member
posted
I have a question to convert a date format (28/03/2004) to a string format (20040328). Is there any function or command to do this in WebFocus?
 
Posts: 55 | Registered: May 15, 2004Reply With QuoteReport This Post
Silver Member
posted Hide Post
If the format of the field is "DMYY" then create a define such as this.
DEFINE FILE CAR
DATE1/A8DMYY = YOURDATEFIELD ;
DATE2/A8 = EDIT(DATE1,'$$$$9999') | EDIT(DATE1,'$$99') | EDIT(DATE1,'99') ;
END

Now you will have am Alphanumeric(text) field that is in YYYYMMDD order.
 
Posts: 36 | Location: Melville,NY | Registered: August 09, 2004Reply With QuoteReport This Post
Gold member
posted Hide Post
Thank you very much. It works fine !
 
Posts: 55 | Registered: May 15, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
or, using the DATECVT function which
changes the form of your smart date...

temp/YYMD = DATECVT(yourdate,'DMYY','YYMD' );
temp1/A8DMYY = temp;
RESULTDATE/A8 = temp1;
produces...
MYDATE.....temp..........temp1........RESULTDATE
13/09/2004 2004/09/13 2004/09/13 20040913
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Date format to String format

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