DRAhmed Posted October 23, 2022 Report Share Posted October 23, 2022 how can i make the date of the check automatically entered when a checkbox is checked Quote Link to comment Share on other sites More sharing options...
0 DRAhmed Posted October 23, 2022 Author Report Share Posted October 23, 2022 1 hour ago, DRAhmed said: how can i make the date of the check automatically entered when a checkbox is checked i used a calculated field using this formular i use a custom time zone in localization Case WHEN [@field:arrived_at_company]= 1 Then GETUTCDATE() End but it still returns utc time instead of the required time zone Quote Link to comment Share on other sites More sharing options...
0 Ilyrian Posted October 24, 2022 Report Share Posted October 24, 2022 Hi You can try the following code: You can change the GMT Standard Time with your desired Time Zone. You can as well change the '100' format to desired one, you can chose from one of these options: https://www.w3schools.com/sql/func_sqlserver_convert.asp Case WHEN [@field:arrived_at_company]= 1 Then (SELECT CONVERT(VARCHAR, CONVERT(DATE, GETDATE() AT TIME ZONE 'UTC' AT TIME ZONE 'GMT Standard Time'), 100) AS [Date_Result]) End DRAhmed 1 Quote Link to comment Share on other sites More sharing options...
0 DRAhmed Posted October 29, 2022 Author Report Share Posted October 29, 2022 On 10/24/2022 at 3:51 PM, RagnarIllyrian said: Hi You can try the following code: You can change the GMT Standard Time with your desired Time Zone. You can as well change the '100' format to desired one, you can chose from one of these options: https://www.w3schools.com/sql/func_sqlserver_convert.asp Case WHEN [@field:arrived_at_company]= 1 Then (SELECT CONVERT(VARCHAR, CONVERT(DATE, GETDATE() AT TIME ZONE 'UTC' AT TIME ZONE 'GMT Standard Time'), 100) AS [Date_Result]) End i did the formula like this Case WHEN [@field:arrived_at_company]= 1 Then (SELECT CONVERT(VARCHAR, CONVERT(DATE, GETDATE() AT TIME ZONE 'UTC' AT TIME ZONE 'Egypt Standard Time'), 113) AS [Date_Result]) End but it shows this incompatible data type. The result of the formula is Text (255) but must be Date/Time. and also the result returned i zeros in the time place Quote Link to comment Share on other sites More sharing options...
0 DRAhmed Posted October 29, 2022 Author Report Share Posted October 29, 2022 On 10/24/2022 at 3:51 PM, RagnarIllyrian said: Hi You can try the following code: You can change the GMT Standard Time with your desired Time Zone. You can as well change the '100' format to desired one, you can chose from one of these options: https://www.w3schools.com/sql/func_sqlserver_convert.asp Case WHEN [@field:arrived_at_company]= 1 Then (SELECT CONVERT(VARCHAR, CONVERT(DATE, GETDATE() AT TIME ZONE 'UTC' AT TIME ZONE 'GMT Standard Time'), 100) AS [Date_Result]) End i used a simple formula Case WHEN [@field:approved]= 1 Then DATEADD(hour, 02, SysUTCDateTime()) end but the problem it shows the current date and time not when the checkbox is checked Quote Link to comment Share on other sites More sharing options...
0 Ilyrian Posted October 31, 2022 Report Share Posted October 31, 2022 On 10/29/2022 at 1:37 PM, DRAhmed said: i used a simple formula Case WHEN [@field:approved]= 1 Then DATEADD(hour, 02, SysUTCDateTime()) end but the problem it shows the current date and time not when the checkbox is checked Indeed this will show the current DateTime when the approved field is checked. I have used the same formula in this page: https://c8cmr089.caspio.com/dp/02cab000dd25f0a542784ccaac8e It works as expected Quote Link to comment Share on other sites More sharing options...
0 DRAhmed Posted October 31, 2022 Author Report Share Posted October 31, 2022 5 hours ago, RagnarIllyrian said: Indeed this will show the current DateTime when the approved field is checked. I have used the same formula in this page: https://c8cmr089.caspio.com/dp/02cab000dd25f0a542784ccaac8e It works as expected but everytime i open the data page it generates a new time and date ( the current ) while it indeed saves the date and time when the checkbox is checked in the table in the data page it generate a new one everytime how to prevent that ? Quote Link to comment Share on other sites More sharing options...
0 Kurumi Posted October 31, 2022 Report Share Posted October 31, 2022 Hi @DRAhmed - what is your expected result? Do you have sample data? DRAhmed 1 Quote Link to comment Share on other sites More sharing options...
0 DRAhmed Posted November 1, 2022 Author Report Share Posted November 1, 2022 13 hours ago, Meekeee said: Hi @DRAhmed - what is your expected result? Do you have sample data? i found a way around using virtual field set to autovalue or autocomplete , dont really remember and it shows data directly from table so yes the calculated field still show current date and time , the viirtual field shows directly from table i would like to ask if you can help with this Quote Link to comment Share on other sites More sharing options...
0 JohnNuttDesk Posted April 5 Report Share Posted April 5 I used a trigger and it works for me. Used in tabular datapage with grid edit enabled etc Quote Link to comment Share on other sites More sharing options...
Question
DRAhmed
how can i make the date of the check automatically entered when a checkbox is checked
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.