artem_niko Posted February 11, 2020 Share Posted February 11, 2020 Hello! In database I have table with field having type TIME. In my project, I using UniDateTimePicker and want set new value of time, using RowEditor. When I select new value from UnIDateTimePicker, I have error: Property of UniDateTimePicker: Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted February 11, 2020 Share Posted February 11, 2020 Hello, 1. This remember me : http://www.unigui.com/doc/online_help/index.html?formatsettings-.htm 2. Be carful when updating dateTime field on your SQL query : http://forums.unigui.com/index.php?/topic/11699-toubles-as-service/&do=findComment&comment=62158 Quote Link to comment Share on other sites More sharing options...
artem_niko Posted February 12, 2020 Author Share Posted February 12, 2020 8 hours ago, Abaksoft said: Hello, 1. This remember me : http://www.unigui.com/doc/online_help/index.html?formatsettings-.htm 2. Be carful when updating dateTime field on your SQL query : http://forums.unigui.com/index.php?/topic/11699-toubles-as-service/&do=findComment&comment=62158 Hello! I was using first link from you answer and write that: procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); begin // Change application global format settings PFmtSettings.CurrencyFormat:=0; PFmtSettings.CurrencyString:='€'; PFmtSettings.DateSeparator:='.'; PFmtSettings.ShortDateFormat:='dd.mm.yyyy'; PFmtSettings.ShortTimeFormat:='hh:mm:ss'; PFmtSettings.TimeSeparator:=':'; end; But this is not working... After select time and pressing button "Save", in RowEditor, I get error. Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted February 12, 2020 Share Posted February 12, 2020 3 hours ago, Артем said: Hello! I was using first link from you answer and write that: procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); begin // Change application global format settings PFmtSettings.CurrencyFormat:=0; PFmtSettings.CurrencyString:='€'; PFmtSettings.DateSeparator:='.'; PFmtSettings.ShortDateFormat:='dd.mm.yyyy'; PFmtSettings.ShortTimeFormat:='hh:mm:ss'; PFmtSettings.TimeSeparator:=':'; end; But this is not working... After select time and pressing button "Save", in RowEditor, I get error. The same error ? What say the log (file on your application) Quote Link to comment Share on other sites More sharing options...
artem_niko Posted February 12, 2020 Author Share Posted February 12, 2020 4 minutes ago, Abaksoft said: The same error ? 5 minutes ago, Abaksoft said: What say the log (file on your application) This is from log: Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted February 12, 2020 Share Posted February 12, 2020 Mmm... i am not sure (as i am not at office). is there setting like this : PFmtSettings.DateTimeFormat.... Quote Link to comment Share on other sites More sharing options...
artem_niko Posted February 12, 2020 Author Share Posted February 12, 2020 1 minute ago, Abaksoft said: М-м ... я не уверен (поскольку я не в офисе). есть ли настройки, как это : PFmtSettings . DateTimeFormat .... No, only this: Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted February 12, 2020 Share Posted February 12, 2020 7 minutes ago, Артем said: No, only this: on Your btnSave onPost event put anything like : begin Showmessage('Hello'); end; to see if the problem comes from roweditor or sql. Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted February 12, 2020 Share Posted February 12, 2020 3 minutes ago, Abaksoft said: on Your btnSave onPost event put anything like : begin Showmessage('Hello'); end; to see if the problem comes from roweditor or sql. Or better : begin Showmessage(MyDataSet.FieldByName('MyFielDateTime').AsString); end; Quote Link to comment Share on other sites More sharing options...
artem_niko Posted February 12, 2020 Author Share Posted February 12, 2020 5 minutes ago, Abaksoft said: Or better : begin Showmessage(MyDataSet.FieldByName('MyFielDateTime').AsString); end; I use the "Save" and "Cancel" buttons, which are used to save when using RowEditor in UniDBGrid. However, I put the code with the message here: procedure TUniFormWorkingTimeForGroup.FDQueryTimesAfterPost (DataSet: TDataSet); begin ShowMessageN (FDQueryTimes.FieldByName ('WorkTime'). AsString); end; And I did not receive this message, because at first I got an error in the browser about the wrong format: "'01 .01.2008 2:30:00 'is not a valid time.", But ShowMessageN did not appear. Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted February 12, 2020 Share Posted February 12, 2020 i think this problem hapened on an previous release and fixed, if i remember. try do download the last : Unigui 1521 Quote Link to comment Share on other sites More sharing options...
artem_niko Posted February 12, 2020 Author Share Posted February 12, 2020 4 minutes ago, Abaksoft said: i think this problem hapened on an previous release and fixed, if i remember. try do download the last : Unigui 1521 I would like @Sherzod to confirm that this error was fixed in version 1521. I downloaded it, but I’m using 1521 so far and don’t want to waste time reinstalling the version on 1521 if it has such an error. I would like to hear a comment from developers and support too. Do you have a test case with UniDateTimePicker settings? May accidentally be in stock. And then I used scripts too and maybe they conflict with what is written in OnCreate UniServerModule. Quote Link to comment Share on other sites More sharing options...
artem_niko Posted February 12, 2020 Author Share Posted February 12, 2020 12 minutes ago, Abaksoft said: i think this problem hapened on an previous release and fixed, if i remember. try do download the last : Unigui 1521 Ok, now I'm installing 1521 and will see, if it error will be exist... Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted February 12, 2020 Share Posted February 12, 2020 1 hour ago, Артем said: Ok, now I'm installing 1521 and will see, if it error will be exist... Hello ApTeM, Here is a simple testcase (No problem on 1519). Try it. DateTime_RowEditor.zip Quote Link to comment Share on other sites More sharing options...
artem_niko Posted February 12, 2020 Author Share Posted February 12, 2020 29 minutes ago, Abaksoft said: Hello ApTeM, Here is a simple testcase (No problem on 1519). Try it. DateTime_RowEditor.zip Thank you for example, but you testcase not help me because you are using ClientDataSet - I'm using FireDAC, you creating field RunTime - I have now created field with time (TIME, Firebird). You are not using UnIDateTImePicker for edit time value. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 12, 2020 Share Posted February 12, 2020 Hi Артем, Can you please make a simple testcase for check? Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted February 12, 2020 Share Posted February 12, 2020 10 minutes ago, Артем said: Thank you for example, but you testcase not help me because you are using ClientDataSet - I'm using FireDAC, you creating field RunTime - I have now created field with time (TIME, Firebird). You are not using UnIDateTImePicker for edit time value. OK. Can you complete my testCase with : - UniDateTimePicker - Time field and let me know... Quote Link to comment Share on other sites More sharing options...
artem_niko Posted February 12, 2020 Author Share Posted February 12, 2020 1 hour ago, Abaksoft said: OK. Can you complete my testCase with : - UniDateTimePicker - Time field and let me know... Sorry, I'm not admin in server and can't create test Firebird database, using FireDAC. May be, possible get new value of time before post into table? For example, in event UnIDateTimePicker1.OnChange and then post new value when pressing button "Save" in RowEditor. Quote Link to comment Share on other sites More sharing options...
artem_niko Posted February 12, 2020 Author Share Posted February 12, 2020 Look, I add UniDateTimePicker in you test case. When I make double click in UniDBGrid1 and using RowEditor, new value of time adding with '01.01.2008'. So, this is value ('01.01.2008') don't must adding. Only time must be insert. I get the same error. Because when you change the value of time, an extra value is added - the year. DateTime_RowEditor_with_UniDateTimePicker.zip Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted February 12, 2020 Share Posted February 12, 2020 Oups....You are right I sent the problem to Unigui support team. Quote Link to comment Share on other sites More sharing options...
artem_niko Posted February 12, 2020 Author Share Posted February 12, 2020 41 minutes ago, Abaksoft said: Oups....You are right I sent the problem to Unigui support team. Ok, thank's! And when will be answer from Support team? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 12, 2020 Share Posted February 12, 2020 We will check. Quote Link to comment Share on other sites More sharing options...
artem_niko Posted February 12, 2020 Author Share Posted February 12, 2020 5 minutes ago, Sherzod said: We will check. Ok! I will be waiting answer. Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted February 13, 2020 Share Posted February 13, 2020 We fixed issue. You will get the fix with the next build. Quote Link to comment Share on other sites More sharing options...
artem_niko Posted February 13, 2020 Author Share Posted February 13, 2020 1 hour ago, Hayri ASLAN said: We fixed issue. You will get the fix with the next build. Ok, very good. And when will be New build? Quote Link to comment Share on other sites More sharing options...
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.