Focal Point
How to convert the date format ?

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

October 26, 2007, 07:29 AM
Gobinath Velusamy
How to convert the date format ?
Hi

I have the date format 2007/12/31 00:00:00.000 from the datasource


My desire output format is 12/31/07

How to achive it ?
Thanks in advance


WebFOCUS 7610
Windows
October 26, 2007, 07:37 AM
RickW
ENGINE SQLORA SET DATETIME OFF or some derivative. You may also need to reformat the date.


WebFOCUS 7.6.6/TomCat/Win2003,SQL Server 2005,Oracle
October 26, 2007, 07:43 AM
Gobinath Velusamy
Hi Ricky

I am using SQL Swrver 2005


WebFOCUS 7610
Windows
October 26, 2007, 08:11 AM
Brian Suter
Change the usage format to MDY .


Brian Suter
VP WebFOCUS Product Development
October 26, 2007, 08:17 AM
Gobinath Velusamy
Hi Brian

How to set usage format ? In where we have to set ?


WebFOCUS 7610
Windows
October 26, 2007, 08:27 AM
FrankDutch
The dateformat you have is something like

HYYMD I suppose

You can see that in the master file.

To change this can be done in several ways.

suppose you do this in the define

DEFINE FILE whatever
NEWDATE/YYMD=HDATE(ORIGDATE, 'YYMD');
END





Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

October 26, 2007, 08:50 AM
Gobinath Velusamy
Hi Frank

I got this error

(FOC002) A WORD IS NOT RECOGNIZED: Dt/YYMD


when i use the code

SQL SQLMSS
SELECT * FROM ;


TABLE FILE SQLOUT

PRINT
*
ON TABLE HOLD
END

TABLE FILE HOLD
PRINT
EndDate AS ''
Dt/YYMD = HDATE(EndDate, 'YYMD');
Full_Name AS ''
Account
Branch_Name AS ''
BY EndDate
END



Please help me to solve this issue


WebFOCUS 7610
Windows
October 26, 2007, 08:58 AM
FrankDutch
change this in

SQL SQLMSS
SELECT * FROM ;

TABLE FILE SQLOUT

PRINT 
* 
ON TABLE HOLD
END

DEFINE FILE HOLD
Dt/YYMD=HDATE(EndDate, 'YYMD');
END

TABLE FILE HOLD
PRINT
Dt AS ''
Full_Name AS ''
Account
Branch_Name AS ''
BY Dt NOPRINT
END





Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

October 28, 2007, 11:58 AM
Gobinath Velusamy
Thanks Frank

I got the 2007/07/31 format only even i change the format YYMD or other formats .... Can i change any intial Parameter for this


Thanks in Advance


WebFOCUS 7610
Windows
October 28, 2007, 01:02 PM
FrankDutch
Well you should read the manual.
You can do so many things with this software, but without the manual and maybe some training you won't get all the possibilities working for you.
It will take some time, we work with Focus for almost 20 year....




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

October 29, 2007, 03:35 AM
Majid Jeddi
Hi

in the following example my field DATECREATED IS A DATETIME FIELD and I changed the display of it by creating the field test and I could see the date displayed as wanted it.

test/HDMY = INVENTORYANDPRODUCTVIEW.INVENTORYANDPRODUCTVIEW.DATECREATED;


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server