appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

[Bug]: Inserting date and time values into snowflake db by binding to date widgets, the date and times entered in the db differ

Open btsgh opened this issue 2 years ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Description

When I bind the insert query values of Date and Time to Datepicker widget, and run the query, the date and time entered into the database varies from what is picked in the widget.

Steps To Reproduce

  1. Connect to the following Snowflake DB. Account name - gv14678.central-india.azure
 Warehouse - COMPUTE_WH
 Database - NEWDBAPARNA
 Default Schema - PUBLIC 
Role - ACCOUNT ADMIN
 User name - Aparna
 Password - Snowflake123
  2. Write an insert query like this for e.g- INSERT INTO CALL_CENTER_APARNA (CC_START_DATE, CC_SKNO, CC_MANAGER, CC_ID, CC_END_DATE, CC_CREATIONTIME, CC_COMPNAME, CC_COMPANYID, CC_CLOSE_DATE_SKNO,CC_CLASS,CC_CITY) VALUES ('{{DatePicker1.selectedDate}}', 5, 'Darshan', '0000005', '{{DatePicker2.selectedDate}}', '{{DatePicker3.selectedDate}}', 'Milkshakes For You!',2,5,'First','Bengaluru');
  3. DatePicker1 /2/3 have specific time and date selected. (Check the attached images). Run the above query and note that in the snowflake database, the values entered differ DateandTimein_AppsmithWidgets
DateandTime_SnowflakeDB

If we directly enter the values in the query(without binding), the values match.

Public Sample App

No response

Version

Release

btsgh avatar Sep 21 '22 15:09 btsgh