Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8088

Re: selecting the current date

$
0
0

You have 2 options,

 

1) Create new formula, lets say CurDateNum and place below formula to convert current Date to Number

tonumber(totext(currentdate,'yyyyMMdd'))

Then in Report Filter put condition

@CurDateNum = {WOC_REASON.OTTRND}

 

Or

 

2) Create a new formula, lets say DateOTTRND and place below formula to convert OTTRND to Date

Date(Mid (CStr ({WOC_REASON.OTTRND}),6 ,1 )&  Mid (CStr ({WOC_REASON.OTTRND}),8 ,1 )&

"/" &

Mid (CStr ({WOC_REASON.OTTRND}),9 ,2 ) &

"/" &

Mid (CStr ({WOC_REASON.OTTRND}),1 ,2 )&  Mid (CStr ({WOC_REASON.OTTRND}),4 ,2 )

)

Then in Report filter place condition

@DateOTTRND = CurrentDate

Note:

-> Your formula looks correct except, you didn't converted from string to Date

 

3) Like to add one more Formula to convert from number to Date (we use most of our CR reports based on Number as Date field)

 

Date ( Val (ToText ({WOC_REASON.OTTRND}, 0 , "") [1 to 4]),

        Val (ToText ({WOC_REASON.OTTRND}, 0 , "") [5 to 6]),

        Val (ToText ({WOC_REASON.OTTRND}, 0 , "") [7 to 8]) )


Viewing all articles
Browse latest Browse all 8088

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>