Focal Point
[SOLVED] Changing format of value returned by pop up calendar

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

May 14, 2010, 10:06 AM
bflemi3
[SOLVED] Changing format of value returned by pop up calendar
Hi All,

I have created a simple html page with the composer and have two calendar controls (Start Date and End Date). When a user selects a date from the calendar control the format of the value selected and inserted into the textbox is YY/MM/DD. I need to have the format changed to YY-MM-DD because of constraints on the database side. Is this possible?

Thanks for any and all advice,
B

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.7
Windows
All Output (Excel, HTML, PDF)
May 14, 2010, 10:17 AM
Severus.snape
Hi,

Yes you can convert the date once it is passed to the fex file...you can use EDIT to do this..
or you can convert the format in the launch page itself before submitting the form..you can write a simple validation function in javascript which can do this..

thanks
Sashanka


WF 7.7.03/Windows/HTML,PDF,EXL
POC/local Dev Studio 7.7.03 & 7.6.11
May 14, 2010, 10:47 AM
njsden
Assuming &STARTDT is one of the parameters sent from the HTML launch page, try:
-DEFAULT &STARTDT='10/05/14';
-SET &NEWSTARTDT=EDIT(&STARTDT, '99-$99-$99');
-TYPE Original: &STARTDT
-TYPE New: &NEWSTARTDT


Use &NEWSTARTDT in your data retrieval request.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
May 14, 2010, 11:04 AM
bflemi3
Thanks njsden, that was a simple solution. Works great!


WebFOCUS 7.7
Windows
All Output (Excel, HTML, PDF)
May 16, 2010, 06:12 PM
Waz
With the calendar control, it will take the format of the field from the HTML page and return that format back to the Edit Box.

It looks for the property ibiformat.

Its a pity that the js routines do not support Y-M-D format.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

May 17, 2010, 05:00 AM
Yangyang
you can make a special char like Y-M-D by compounding Smiler


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET
January 08, 2013, 11:33 AM
John_Edwards
The solution to the question she asked -- changing the appearance of the returned date on the HTML page --

 
<INPUT id=calendar1 elementtype="14" name="calendar1" ibiformat="MDYY">    
 


That last piece, ibiformat, is what determines what is displayed to the enduser.

J.