irigsoft Posted March 26, 2021 Share Posted March 26, 2021 21 minutes ago, Cristian87 said: Yes thanks..but how do you compare a field date with a format date? If I understand you correct, this is my function: Adoquery1.SQL.Add ('SET DATEFORMAT dmy;' + ' SELECT * FROM MyTableData' + ' WHERE MyDateField = ''' + FormatDateTime ('dd.MM.yyyy HH:mm:ss',Now,MySettings) + '''' ); Adoquery1.Open; where MySettings is extremely important, this: GetLocaleFormatSettings(GetUserDefaultLCID, MySettings); //SysUtils MySettings.DateSeparator := '.'; MySettings.TimeSeparator := ':'; MySettings.DecimalSeparator := '.'; MySettings.LongTimeFormat := 'HH:mm:ss'; MySettings.ShortDateFormat := 'dd-MM-yyyy'; MySettings.ShortTimeFormat := 'HH:mm'; correct all localsettings for application Quote Link to comment Share on other sites More sharing options...
irigsoft Posted March 26, 2021 Share Posted March 26, 2021 If You want to use parameters: with Adoquery1.Parameters do begin Clear; AddParameter.Name := 'MyDatePar'; ParamValues ['MyDatePar'] := FormatDateTime ('dd.MM.yyyy HH:mm:ss',Now,MySettings); end; Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 26, 2021 Administrators Share Posted March 26, 2021 Correct solution is setting format settings in your app: http://www.unigui.com/doc/online_help/index.html?formatsettings-.htm 1 Quote Link to comment Share on other sites More sharing options...
Cristian87 Posted March 26, 2021 Author Share Posted March 26, 2021 Don't works. The calendar don't show event Quote Link to comment Share on other sites More sharing options...
mehmet07 Posted March 26, 2021 Share Posted March 26, 2021 Would you try these settings. There was a bug in windows. Maybe it will work Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 26, 2021 Administrators Share Posted March 26, 2021 4 hours ago, Cristian87 said: Don't works. The calendar don't show event How do you populate calendar data? Quote Link to comment Share on other sites More sharing options...
Cristian87 Posted March 26, 2021 Author Share Posted March 26, 2021 3 hours ago, mehmet07 said: Would you try these settings. There was a bug in windows. Maybe it will work Not works Quote Link to comment Share on other sites More sharing options...
Cristian87 Posted March 26, 2021 Author Share Posted March 26, 2021 13 minutes ago, Farshad Mohajeri said: How do you populate calendar data? var E : TUniCalendarEvent; E := Calendar.Events.Add; E.CalendarId := 1; E.Title := 'MY TITLE'; E.StartDate := EncodeDate(myQuery.FieldByName('year').asinteger,myQuery.FieldByName('month').asinteger,myQuery.FieldByName('day').asinteger); E.EndDate := E.StartDate; E.IsAllDay := True; Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 26, 2021 Administrators Share Posted March 26, 2021 Can you reproduce this in a small testcase? Quote Link to comment Share on other sites More sharing options...
jemmyhatta Posted April 8, 2022 Share Posted April 8, 2022 is there any solution? I also have same problem, the calendar panel wont show the event, even i'm open project in unigui demo calendar panel. i use uni-1.90.0.1554 and RAD STUDIO 11 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 8, 2022 Share Posted April 8, 2022 Hello, 51 minutes ago, jemmyhatta said: is there any solution? I also have same problem, the calendar panel wont show the event, even i'm open project in unigui demo calendar panel. i use uni-1.90.0.1554 and RAD STUDIO 11 On 3/26/2021 at 10:30 PM, Farshad Mohajeri said: Can you reproduce this in a small testcase? Quote Link to comment Share on other sites More sharing options...
jemmyhatta Posted April 8, 2022 Share Posted April 8, 2022 its not showing any event TEST.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 8, 2022 Share Posted April 8, 2022 3 minutes ago, jemmyhatta said: TEST.zip 10.88 MB · 0 downloads Can you create this on a simple DB, not on MSSQL? Quote Link to comment Share on other sites More sharing options...
jemmyhatta Posted April 8, 2022 Share Posted April 8, 2022 ok TEST.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 8, 2022 Share Posted April 8, 2022 48 minutes ago, jemmyhatta said: TEST.zip 10.17 MB · 0 downloads Okay. When doesn't it load? UniCalendarPanel1.Events.LoadFromFile? 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.