Focal Point
[SOLVED] Coverting Date format in FOCEXEC

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/8177070286

April 28, 2016, 05:42 PM
djseattle
[SOLVED] Coverting Date format in FOCEXEC
I'm new to Focexec and I need to convert date from mm/dd/yyyy to yyyy-mm-dd.
Could someone please help?

Regards,
Dave

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


WebFOCUS 8
Windows, All Outputs
April 28, 2016, 06:13 PM
Waz
Hi Dave,

Welcome to the forum.

To help, we will need a little more information like the field format, or is it dialog manager (line starts with a -)

Also searching the forum may help as well as the documentation.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

April 28, 2016, 06:30 PM
djseattle
Here you go.

Thanks,

-DEFAULTS &7='01/04/2013'


WebFOCUS 8
Windows, All Outputs
April 28, 2016, 06:38 PM
Waz
This is very easy to do.

I would suggest looking at the character functions as you have text. In general terms, all &variables are text.

Check out these Character Functions


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

April 28, 2016, 07:47 PM
djseattle
Waz,

How do I use EDIT function to rearrange date from mm/dd/yyyy to yyyy-mm-dd? Sometimes, month and/or day could be single digit. I just need it to convert to ISO format. Is there a function that will convert an input date to ISO date format?

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


WebFOCUS 8
Windows, All Outputs
April 29, 2016, 08:44 AM
Tamra
Hello djseattle,

This topic has been added to the "iWay Forum" but seems to be a WebFOCUS question.
I understand you are new to the Focal Point forum - Welcome! however, you will receive better
response if the question is in the right forum.

If this is related to an iWay topic then that is fine. Once you become more familiar with the product(s) then you will get a feel for where the question should be posted.

As far as ISO is concerned please refer to the following link on the IBI TechSupport site.

SET DTSTANDARD = {OFF|ON|STANDARD|STANDARDU}

Add the following to the edasprof.prf or your fex.

SET DTSTANDARD = {OFF|ON|STANDARD|STANDARDU} - description of the options are in the link

For your EDIT of date please refer to the following Focal Point WebFOCUS links:

[Solved] Date Formatting for Calendar
For the above link - see the conversation posted on posted June 13, 2012 10:06 AM
This provided EDIT reformatting of the date. You will have to ensure it conforms to your date format.

If you have only a single digit then you may need to check for this and then concatenate ('|') the '0' to the first digit.

Hope this helps you out, let us know.

Once you are satisfied with the replies then we also as you to update the subject line
Tag your topic with keywords .


Thank you for participating in the Focal Point Forum.

Kindest regards,
Tamra Colangelo
Focal Point Moderator - Information Builders Inc.
* Summit 2016 – June 13-17 in Reno, Nevada  - http://www.informationbuilders.com/events/summit


WebFOCUS 8x - BI Portal, Developer Studio, App Studio, Excel, PDF, Active Formats and HTML5
April 29, 2016, 01:52 PM
djseattle
What is the best way to look for single digit?
There is no split function so I have managed to do this using EDIT and IF statement. However, the code became very long.


WebFOCUS 8
Windows, All Outputs
May 02, 2016, 08:54 AM
jgelona
"What is the best way to look for single digit?"

djseattle, is this a different question than your original? If so, it should be a new topic

Actually there is split function, it is call GETTOK. It "splits" a string based on a search string.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
May 02, 2016, 11:10 AM
djseattle
Thanks everyone for your responses, and helping me find solution.


WebFOCUS 8
Windows, All Outputs