Focal Point
Current Date Format
December 11, 2007, 04:11 AM
Gobinath VelusamyCurrent Date Format
Hi All
I want to print the current value as this format
"Tuesday,January 16,2007 2.35 PM"
Format
How can i achive this one ???
Please help me to solve this problem
Thanks in Advance
Gobinath Veludamy
WebFOCUS 7610
Windows
December 11, 2007, 05:50 AM
Tony AGobinath,
Have you tried anything at all yet to obtain this?
What manuals have you checked? What searches in documentation (top right) have you performed?
If you let us know what you have already tried then we might help you some more, but if you haven't yet tried to solve this on your own (as it would appear) then at least first try something.
T
In FOCUS since 1986 | WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2 | | |
WebFOCUS App Studio 8.2.06 standalone on Windows 10 | |
December 11, 2007, 07:18 AM
Gobinath VelusamyHi Tony
I tried with today() function
My Code .....
SQL SQLORA
SELECT SYSDATE A FROM DUAL;
TABLE FILE SQLOUT
PRINT
A
COMPUTE DAT/A100 = TODAY('A100');
ON TABLE HOLD
END
TABLE FILE HOLD
PRINT
DAT
END
********************************************
i got the 12/11/2007 format only
Thanks in Advance
Gobinath Velusamy
WebFOCUS 7610
Windows
December 11, 2007, 08:00 AM
FrankDutchSo your sysdate is a string that only holds the date.
Do you also have a filed like systime?
If you have you need to concatenate these fields to one field (DATETIME) and then you can start changing the format on that field. or you can decide first the manipulation on the date field and then on the time field and in the last step combine these two to one string.
|
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 |
December 11, 2007, 08:58 AM
Tony AGobinath,
At least you have tried something, I (we?) get disenchanted with folks who are not prepared to at least try and find out what they need.
Try this -
-SET &DOWK = DOWKL(&YYMD, 'A12');
-TYPE &DOWK &DATEDMtrYY &TOD
T
In FOCUS since 1986 | WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2 | | |
WebFOCUS App Studio 8.2.06 standalone on Windows 10 | |
December 11, 2007, 10:20 AM
Francis MarianiHere's what I believe is an undocumented System Date variable (I've never used it before):
&DATEwrMtrDYY
It works in v5.3.2. I wonder if it's mentioned in that famous book, '10001 things to do with dates'?
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
December 11, 2007, 10:46 AM
FrankDutchFrancis
your blowing out of proportions with this book....
it's 1001 not ten times more...or are you writing your own book.
|
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 |
December 11, 2007, 10:59 AM
GlendaFrancis,
The book does not mention that combination. But it does give the following:
"For the record, there are eight possible date forms, four possible month transformation options and eight day transformation options (but only two results); thus the possible combinations are (8x4x8) or 256."
Anyone who doesn't have the book needs to order one.
Glenda
In FOCUS Since 1990
Production 8.2 Windows
December 12, 2007, 05:31 PM
StuBouyerRefer to "Printing Options" page 26-27 of 2nd Edition
It doesn't specifically give Francis's example, but the table in Example 1.6 gives all the elements, and it states
"The print options combined with the basic SmartDate or DateTime formats produce a wide range of date field formats."
I strongly agree with Glenda that this is a must have book for anyone writing webfocus code that does anything with dates.
WebFOCUS 8.2.03 (8.2.06 in testing)