Jump to content

Big problem with calendar


Cristian87

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 ?

 

Link to comment
Share on other sites

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);

Link to comment
Share on other sites

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;

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...