Cristian87 Posted March 26, 2021 Share Posted March 26, 2021 I have a big problema with unipanelcalendar. When I launch the application with the .exe file, the calendar show correctly the events, but when I work in ISAPI with dll it don't work! The events hasn't show and with some problems of format date. Why? I use the version 1.90.0.1546 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 26, 2021 Share Posted March 26, 2021 5 minutes ago, Cristian87 said: When I launch the application with the .exe file, the calendar show correctly the events, but when I work in ISAPI with dll it don't work! Hello, Both applications run on a remote machine? Quote Link to comment Share on other sites More sharing options...
Cristian87 Posted March 26, 2021 Author Share Posted March 26, 2021 I installed the dll on IIS on the customer's server and there is the problem. If I launch the .exe the problem there isn't Quote Link to comment Share on other sites More sharing options...
Cristian87 Posted March 26, 2021 Author Share Posted March 26, 2021 I have installed the dll on the IIS on my pc and it work perfectly.. On customer's server I need install some other dll or configuration? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 26, 2021 Administrators Share Posted March 26, 2021 Hello, Problem is related to date & time formats. Probably your system doesn't use same date format on all accounts. What is your system locale? Quote Link to comment Share on other sites More sharing options...
Cristian87 Posted March 26, 2021 Author Share Posted March 26, 2021 10 minutes ago, Farshad Mohajeri said: Hello, Problem is related to date & time formats. Probably your system doesn't use same date format on all accounts. What is your system locale? On my system or on customer? But if I launch .exe on customer it works correctly Quote Link to comment Share on other sites More sharing options...
mhmda Posted March 26, 2021 Share Posted March 26, 2021 10 minutes ago, Farshad Mohajeri said: Hello, Problem is related to date & time formats. Probably your system doesn't use same date format on all accounts. What is your system locale? Exactly Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 26, 2021 Administrators Share Posted March 26, 2021 2 minutes ago, Cristian87 said: On my system or on customer? But if I launch .exe on customer it works correctly On customer's system. EXE runs in current user account which may have a different date format from the account used in IIS. Quote Link to comment Share on other sites More sharing options...
Cristian87 Posted March 26, 2021 Author Share Posted March 26, 2021 Is the same on my pc. How can I see the format of account used in IIS? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 26, 2021 Administrators Share Posted March 26, 2021 Here you can use Copy Settings to apply same Locale to all existing accounts in the system. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 26, 2021 Administrators Share Posted March 26, 2021 Quote Link to comment Share on other sites More sharing options...
Cristian87 Posted March 26, 2021 Author Share Posted March 26, 2021 I do it..but there is same problem. I must reboot? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 26, 2021 Administrators Share Posted March 26, 2021 10 minutes ago, Cristian87 said: I do it..but there is same problem. I must reboot? Windows will ask to reboot. Quote Link to comment Share on other sites More sharing options...
Cristian87 Posted March 26, 2021 Author Share Posted March 26, 2021 I have reboot but there is same problem Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 26, 2021 Administrators Share Posted March 26, 2021 1 minute ago, Cristian87 said: I have reboot but there is same problem 18 minutes ago, Farshad Mohajeri said: Have you applied this? 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 also check uniGUI log files? Quote Link to comment Share on other sites More sharing options...
Cristian87 Posted March 26, 2021 Author Share Posted March 26, 2021 4 minutes ago, Farshad Mohajeri said: Have you applied this? Yes but the format of system date is the same on my pc. Where can I see the format of the account IIS? Quote Link to comment Share on other sites More sharing options...
Cristian87 Posted March 26, 2021 Author Share Posted March 26, 2021 30 minutes ago, Farshad Mohajeri said: Can you also check uniGUI log files? '00:00' is not a valid date and time-192.168.0.12]:EConvertError : '00:00' is not a valid date and time : Addr: $02346B76 But on show of calendar there aren't errors Quote Link to comment Share on other sites More sharing options...
irigsoft Posted March 26, 2021 Share Posted March 26, 2021 31 minutes ago, Cristian87 said: '00:00' is not a valid date and time-192.168.0.12]:EConvertError : '00:00' is not a valid date and time : Addr: $02346B76 But on show of calendar there aren't errors Hello, like what user start IIS ? Windows User, or Administrator ? Quote Link to comment Share on other sites More sharing options...
irigsoft Posted March 26, 2021 Share Posted March 26, 2021 Or Try to use this: uses SysUtils; var MySettings: TFormatSettings; procedure TUniServerModule.UniGUIServerModuleBeforeInit(Sender: TObject); begin //http://www.delphibasics.co.uk/RTL.asp?Name=GetLocaleFormatSettings GetLocaleFormatSettings(GetUserDefaultLCID, MySettings); //SysUtils MySettings.DateSeparator := '.'; MySettings.TimeSeparator := ':'; MySettings.DecimalSeparator := '.'; MySettings.LongTimeFormat := 'HH:mm:ss'; MySettings.ShortDateFormat := 'dd-MM-yyyy'; MySettings.ShortTimeFormat := 'HH:mm'; //set local settings to application In Procedure You can use FormatDateTime ('dd-MM-yyyy HH:mm:ss',Now,MySettings); Quote Link to comment Share on other sites More sharing options...
irigsoft Posted March 26, 2021 Share Posted March 26, 2021 In my queryes I use declaration of dateformat. Use MSSQL and Query start with: SET DATEFORMAT dmy; Quote Link to comment Share on other sites More sharing options...
Cristian87 Posted March 26, 2021 Author Share Posted March 26, 2021 I have print with a showMessage then ShortDateFormat of GetUserDefaultLCID In dll in IIS: dd/MM/yyyy In exe application: dd/MM/yyyy Is the same but the calendar don't show event in dll but it works in exe Quote Link to comment Share on other sites More sharing options...
Cristian87 Posted March 26, 2021 Author Share Posted March 26, 2021 14 minutes ago, irigsoft said: In my queryes I use declaration of dateformat. Use MSSQL and Query start with: SET DATEFORMAT dmy; How? Can you show an example please? Quote Link to comment Share on other sites More sharing options...
irigsoft Posted March 26, 2021 Share Posted March 26, 2021 3 minutes ago, Cristian87 said: How? Can you show an example please? I use in MS SQL. https://docs.microsoft.com/en-us/sql/t-sql/statements/set-dateformat-transact-sql?view=sql-server-ver15 https://stackoverflow.com/questions/6054794/how-to-change-default-systemdate-from-ymd-to-dmy Adoquery1.SQL.Add ('SET DATEFORMAT dmy;' + ' SELECT * FROM MyTableData' + ' WHERE YourCriteria' ); Adoquery1.Open; Quote Link to comment Share on other sites More sharing options...
Cristian87 Posted March 26, 2021 Author Share Posted March 26, 2021 3 minutes ago, irigsoft said: I use in MS SQL. https://docs.microsoft.com/en-us/sql/t-sql/statements/set-dateformat-transact-sql?view=sql-server-ver15 https://stackoverflow.com/questions/6054794/how-to-change-default-systemdate-from-ymd-to-dmy Adoquery1.SQL.Add ('SET DATEFORMAT dmy;' + ' SELECT * FROM MyTableData' + ' WHERE YourCriteria' ); Adoquery1.Open; Yes thanks..but how do you compare a field date with a format date? 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.