Skip to main content
Solved

control date output from date picker control

  • September 19, 2024
  • 7 replies
  • 70 views

Forum|alt.badge.img+6

I have a Crystal Report that expects 2 dates as parameters.

When I run a trace on the db using an extended event I can see what query the Crystal Repost is executing:

exec "VMS"."dbo"."reporting_price_and_purchasing_headerinfo_v2";1 9, 1, N'1-1-2020', N'29-8-2024'

The problem seems to be in the formatting of the date which is dd-mm-yyyy while the SP expects a DATE which is yyyy-mm-dd

When I run the CR report manually and enter 2020-01-01 and 2024-08-28 as dates the trace shows:

EXEC "VMS"."dbo"."reporting_price_and_purchasing_headerinfo_v2";1 9, 1, N'2020-01-01', N'2024-08-29'

And the report shows the correct data.

But how can I force the date picker in my Thinkwise application to output the selected date as yyyy-mm-dd rather than the more human readable (on this side of the big Atlantic puddle) dd-mm-yyyy?


This question is related to my previous topic but the focus shifted from debugging to fixing a specific issue.

 

Best answer by Alban_T

Dani wrote:

Hey Alban_T,

To use other format for the date picker, there is an extended property that can be used : “CustomDateMask”. Here you can specify the date format that you want.

For more information, please check our documentation:
https://docs.thinkwisesoftware.com/docs/sf/extended_properties#available-extended-properties

I hope this information help.

THis issue was parked for a while, and now I'm trying to pick it up again.

Looking at the documentation for “CustomDateMask” :

Specifies a custom date mask the GUI uses to show date values. If no CustomDateTimeMask is specified, this mask is also used for the date part of datetime values.

It suggests that it influences how the date is shown in the GUI, but in the GUI it is already shown correctly. Besides, this is an IAM global setting so it should have already been set correctly because other models in the same IAM work correctly.

The problem seems to be that the report is using a DATE instead of a DATETIME.
When I run the report in Crystal Report it works correctly BUT there is no date picker while on another report (which works fine from the same TW application) a datetime is used and that does show a datetime picker. It seems to be a Crystal Reports issue after all :(



 

View original
Did this topic help you find an answer to your question?
This topic has been closed for replies.

7 replies

Dani
Moderator
Forum|alt.badge.img+2
  • Moderator
  • 11 replies
  • September 19, 2024

Hey Alban_T,

To use other format for the date picker, there is an extended property that can be used : “CustomDateMask”. Here you can specify the date format that you want.

For more information, please check our documentation:
https://docs.thinkwisesoftware.com/docs/sf/extended_properties#available-extended-properties

I hope this information help.


Forum|alt.badge.img+6
  • Author
  • Hero
  • 86 replies
  • September 23, 2024
Dani wrote:

Hey Alban_T,

To use other format for the date picker, there is an extended property that can be used : “CustomDateMask”. Here you can specify the date format that you want.

For more information, please check our documentation:
https://docs.thinkwisesoftware.com/docs/sf/extended_properties#available-extended-properties

I hope this information help.

Is that for all datepickers or can I set it for a specific one?

The documentation seems to indicate that it would globally change it.


Renée Evertzen
Moderator
Forum|alt.badge.img+4

@Alban_T :

This would change the way the date picker is presented for all date pickers within the scope of one specific application. If that is what you mean by ‘globally change it', then yes, it would globally change it.


Forum|alt.badge.img+6
  • Author
  • Hero
  • 86 replies
  • September 24, 2024
Renée Evertzen wrote:

@Alban_T :

This would change the way the date picker is presented for all date pickers within the scope of one specific application. If that is what you mean by ‘globally change it', then yes, it would globally change it.

That means I need to be carefull and triple check what happens in the rest of the application.
I'll have a look.


Forum|alt.badge.img+6
  • Author
  • Hero
  • 86 replies
  • Answer
  • October 18, 2024
Dani wrote:

Hey Alban_T,

To use other format for the date picker, there is an extended property that can be used : “CustomDateMask”. Here you can specify the date format that you want.

For more information, please check our documentation:
https://docs.thinkwisesoftware.com/docs/sf/extended_properties#available-extended-properties

I hope this information help.

THis issue was parked for a while, and now I'm trying to pick it up again.

Looking at the documentation for “CustomDateMask” :

Specifies a custom date mask the GUI uses to show date values. If no CustomDateTimeMask is specified, this mask is also used for the date part of datetime values.

It suggests that it influences how the date is shown in the GUI, but in the GUI it is already shown correctly. Besides, this is an IAM global setting so it should have already been set correctly because other models in the same IAM work correctly.

The problem seems to be that the report is using a DATE instead of a DATETIME.
When I run the report in Crystal Report it works correctly BUT there is no date picker while on another report (which works fine from the same TW application) a datetime is used and that does show a datetime picker. It seems to be a Crystal Reports issue after all :(



 


Jeroen van den Belt
Administrator
Forum|alt.badge.img+9

That's unfortunate, @Alban_T. Since you've concluded that it's likely a Crystal Reports issue, do you need any further assistance on this? Or do you still have any questions about this topic?


Forum|alt.badge.img+6
  • Author
  • Hero
  • 86 replies
  • October 30, 2024
Jeroen van den Belt wrote:

That's unfortunate, @Alban_T. Since you've concluded that it's likely a Crystal Reports issue, do you need any further assistance on this? Or do you still have any questions about this topic?

No further assistance is needed.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings