Hi
I have String Datatype for Date variable in Crystal Reports. What should be the query syntax for OINV table in a Stored Procedure in Sap B1 Hana Database.
Thanks
Hi
I have String Datatype for Date variable in Crystal Reports. What should be the query syntax for OINV table in a Stored Procedure in Sap B1 Hana Database.
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Naimish MakwanaPosted Jan 6, 2025, 9:59 AM
If the user enters the date in the format
dd/MM/yyyy, you'll need to adjust theTO_DATEfunction to match this format. Here's how you can modify the stored procedure to handle thedd/MM/yyyyformat:In this example,
TO_DATE(dateString, 'DD/MM/YYYY')converts the string to a date format that matches thedd/MM/yyyyinput.This should work correctly for a date like
01/04/2024.Ramco RamcoPosted Jan 6, 2025, 9:58 AM
Hi Naimish
If user enters 01/04/2024 . Will it work. User has entered date in dd/MM/yyyy.
Thanks
Naimish MakwanaPosted Jan 6, 2025, 9:22 AM
To handle a date variable stored as a string in Crystal Reports and query the OINV table in a stored procedure for SAP B1 HANA, you can convert the string to a date format within your query. Here's an example of how you can do this:
In this example:
dateStringis the input parameter of typeNVARCHAR(10)which holds the date as a string.TO_DATE(dateString, 'YYYY-MM-DD')converts the string to a date format.OINVtable where theDocDatematches the converted date.Make sure to adjust the date format in
TO_DATEfunction according to the format of your date string.Thanks