I need my date time fields to have a T between date and time yyyy-mm-ddThh:mm:ss.
Example: 2016-04-01T13:45:23
I found a T separator option in the Help file: - T applies the letter âTâ as the separator. Note: The T separator option is available for DateTime field formats (which is the U separator in the Master File), and enables recognition and output of the ISO standard format, where T is the delimiter between date and time.
I don't understand how to get it to work. Anyone use this before?This message has been edited. Last edited by: Mikey,
8007 Windows 7, PDF, Excel
May 16, 2016, 02:10 PM
GavinL
Mikey, if you come to my desk, I'll let you borrow my "1001 Ways to Work with DATES in WebFOCUS" book..
- FOCUS Man, just FOCUS! ----------------------------- Product: WebFOCUS Version: 8.1.04 Server: Windows 2008 Server
- FOCUS Man, just FOCUS! ----------------------------- Product: WebFOCUS Version: 8.1.04 Server: Windows 2008 Server
May 16, 2016, 02:36 PM
David Briars
Try putting a 'U' between the date and time format components, and setting DTSTANDARD:
SET DTSTANDARD = ON
SET PAGE = OFF
DEFINE FILE CAR
-* Create a field in DATE-TIME Format.
MIKEY/HYYMDS = DT(2005 DEC 26 05:45);
-* Convert format.
LIFECEREAL/HYYMDUS = MIKEY;
END
TABLE FILE CAR
PRINT CAR NOPRINT
MIKEY
LIFECEREAL
IF RECORDLIMIT EQ 1
ON TABLE SET STYLEMODE FIXED
END
This is what I was missing SET DTSTANDARD = ON Thank you!
8007 Windows 7, PDF, Excel
May 16, 2016, 02:57 PM
GavinL
quote:
SET DTSTANDARD = ON SET PAGE = OFF DEFINE FILE CAR -* Create a field in DATE-TIME Format. MIKEY/HYYMDS = DT(2005 DEC 26 05:45); -* Convert format. LIFECEREAL/HYYMDUS = MIKEY; END TABLE FILE CAR PRINT CAR NOPRINT MIKEY LIFECEREAL IF RECORDLIMIT EQ 1 ON TABLE SET STYLEMODE FIXED END
- FOCUS Man, just FOCUS! ----------------------------- Product: WebFOCUS Version: 8.1.04 Server: Windows 2008 Server
May 16, 2016, 03:03 PM
Mikey
This is not working when I use EXL07 output
8007 Windows 7, PDF, Excel
May 16, 2016, 04:03 PM
David Briars
We don't do a lot of MS Excel output; when we do we use FORMAT EXL2K.
When I added 'ON TABLE PCHOLD FORMAT EXL2K' to the model code the data appeared fine in Excel 2013. This message has been edited. Last edited by: David Briars,
Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
May 17, 2016, 02:03 PM
Mikey
I forgot about the EXL07 output getting different results with certain code. I bumped the HYYMDUS code up to a HOLD table and the T is there in my output table.