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] (FOC1426) DATA ELEMENT VALUE TOO BIG FOR SEGMENT/FIELD
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] (FOC1426) DATA ELEMENT VALUE TOO BIG FOR SEGMENT/FIELD
 Login/Join
 
Member
posted
Hi All,

I am trying to format a date for excel output as a date and not a string.

I am using embedded SQL...

'to_Date(sm.dep)' works properly but I want to format it differently. If I use 'to_Date(sm.dep, 'mm/dd/yyyy')' I get the error in the subject title.

Does anyone have any insight on this? Thanks.

This message has been edited. Last edited by: FP Mod Chuck,
 
Posts: 6 | Registered: June 04, 2019Reply With QuoteReport This Post
Master
posted Hide Post
Could you provide a little more detail?
Is it a SQL Passthrough?
What is the db you are connecting to (different databases have slightly different SQL syntax ie: SQL Server, Oracle, Postgress, etc.)?
Have you done a SQL trace?
Can you provide the procedure code?


Hallway
WF(Prod):8202M
WF(Test):8202M
OS/Platform:Win 10
Outputs:All
 
Posts: 485 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Reply With QuoteReport This Post
Expert
posted Hide Post
Consider this: This query shows the same date, but with the format specified.

SELECT TO_DATE('10-25-2019', 'MM-DD-YYYY') AS date_test
FROM DUAL;

The data, 10-25-2019, can be a field.


   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Most recent: 8204 Gen 48 in Test and Production.
   Currently Available. Please contact me.
 
Posts: 3040 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
You're trying to make the database format a text according to a date-format specification that does not match that text.

Dates don't have a "format", it's just a big number. What you see in clients is an interpretation of a date converted to text, usually formatted according to your localization settings or explicitly converted to text using a specific format.

If you want a formatted date, then you must convert it to text using to_char(a_date, format_specification), or you must set your client's localization according to the desired format so that the client handles the conversion appropriately.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1649 | Location: Enschede, Netherlands | Registered: August 12, 2010Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] (FOC1426) DATA ELEMENT VALUE TOO BIG FOR SEGMENT/FIELD

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