Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
How to get day of date in iob level
gopi.inampudi
<p>Hi,</p>
<p> </p>
<p>I want to display the day of current date in iob level. But we doesn't have day() function in iob level function.</p>
<p> </p>
<p>In report design we have the function. But as per my requirment we should use in iob itself. </p>
<p> </p>
<p>How can we get that?</p>
<p> </p>
<p>--</p>
<p>Thanks & Regards,</p>
<p>Gopi</p>
Find more posts tagged with
Comments
JFreeman
<p>I'm not clear on exactly what you are asking.</p>
<p>Can you please provide more details on your use case and what you are wanting to accomplish?</p>
pricher
<p>Hi,</p>
<p> </p>
<p>Have you tried the DATEPART function? To return the day of the SHIPBYDATE, you would use it this way:</p>
<p> </p>
<p>DATEPART('d', SHIPBYDATE)</p>
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>
gopi.inampudi
<p>Hi</p>
<p> </p>
<p>by using the DATEPART function its returning the DATE.</p>
<p> </p>
<p>Example: DATEPART('07/09/2015',<span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">SHIPBYDATE) --> 07</span></p>
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">But here i am lokking for instead of 07 it should return Thursday.</span></p>
<p> </p>
<p><span>report level we have Day() function. But in iob level this function is not working. Then i should i achieve it.</span></p>
<p> </p>
<p><span>Please suggest.</span></p>
JFreeman
<p>The exact syntax will vary depending on the data base type you are using.</p>
<p>With PostgreSQL, this can be achieved using 'Day' with the to_char function.</p>
<p> </p>
<p>For example:</p>
<pre class="_prettyXprint _lang-sql">
Select to_char(public.sampletable.datecol, 'Day')
from public.sampletable</pre>
<p>Output:</p>
<pre class="_prettyXprint _lang-nocode">
Friday
</pre>