sam-sams-15 wrote: ↑Thu Jul 06, 2023 1:45 pm
It [throws] an error pointing to the functions [which aren't allowed] …
The StarBasic language has functions, desribed in Help → Contents → Macros and Programming → Run-Time Functions. The SQL language has functions, described in the reference material
for the database you're using. You do not say which database you've connected with. Different databases support different functions. It is your responsibility to locate the SQL language documentatation for the database you've chosen. Your database probably supports SQL functions for date/time conversions.
You can only use StarBasic functions when writing StarBasic statements in your macro.
You can only use SQL functions in the SQL statement which you pass to your database. You can use StarBasic functions in your macro to help build an SQL statement which uses SQL functions. SQL does not execute the StarBasic functions because it only receives the completed SQL statement. Basic does not execute the SQL functions because they are just used as text strings in the macro.
Although CINT and INSTR are StarBasic functions, the error messages you received say that they are not SQL functions for the database you're using.
If this solved your problem please go to your first post use the Edit ☐ button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).