Announcements
No record found.
i need to convert this format to string 15-jun-10 any help
*This post is locked for comments
mthName(mthOfYr(YourDate)) will give you month Name,
concat that with dayOfMth(YourDate) and year(YourDate)
"to convert this format to string 15-jun-10" makes no sense, because it's the string that has a format.
Did you mean converting a date to a string in this format, or converting a string in this format to date?
i have date as parameter 01-Jan-2010 and when i use it in select statement there is no data retrieved when i remove the date from select it will run correct
this is my select
while select AccountNum from vendtable group by vendtable.AccountNum,dirPartyTable.name
join vendtrans where vendtable.AccountNum ==vendtrans.AccountNum
join dirPartyTable where dirPartyTable.RecId ==vendTable.Party
&& vendtrans.TransDate >=_parm.ParmFromDate()
&& vendtrans.TransDate <=_parm.ParmToDate()
Date values have no format; "01-Jan-2010" is how it looks like after converting to text and the same value may be displayed in a different format for different users (if they use different regional settings). Understanding this difference is critical.
If the type of ParmFromDate() and ParmToDate() is date, you don't need any conversion. It seems that you don't have any data fulfilling the condition.
If the type is string, you should change it to date.
Thank you Martin Dráb
when i convert date2str it run and data type of ParmFromDate() and ParmToDate() is date
&& vendtrans.TransDate >=str2date(01/01/2015)
&& vendtrans.TransDate <=_str2date(01/01/2018)
I'm sorry, but I don't understand what you're saying.
If the type is date, no conversion is needed. Also, you said you used date2str(), but your code shows str2date() (where you're passing date literals instead of strings, so it makes no sense).
Hi,
Change your parm method use transedate EDT instead of String.
Can you share your parm method code.
Yes, if he uses string (which he didn't confirm), he should switch to date. I already suggested that above.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CP04-islander 39
Michel ROY 14
imran ul haq 8