Skip to main content
Inspiring
December 31, 2015
Question

cpinfoCurrentLocaleDateString cutting off last 2 digits

  • December 31, 2015
  • 3 replies
  • 1706 views

Hi People

Can anyone help with this, I don't appear to be able to find the problem myself.

I'm using Captivate 9 with a MBP

Many thanks in advance.

    This topic has been closed for replies.

    3 replies

    Dirlo
    Inspiring
    March 17, 2020

    ...

    Hello Captivaters !...

    I had the same issue :

    But  I found a solution !...

     

    1./ Create a variable : v_Date

    2./ On the enter slide action :

    Assign

    v_Date

    with

    cpInfoCurrentLocaleDateString

     

    And that's it !!..

    (Post edited after Lieve's correction !)

    😉

    ...

     

    Lilybiri
    Legend
    March 17, 2020

    Hmmm Ludovic, did you mean ASSIGN instead of Affect?

     

    For other users: the advantage of the mentioned system variable is that the date will be presented in the format you have set up in your OS. When you change that setup, the result will be different. More information about all system variables in:

    http://blog.lilybiri.com/discover-slash-use-captivates-system-variables-part-1

     

    Dirlo
    Inspiring
    March 17, 2020

    ...

    Oups ! you're right !... (as usual !...)

    Assign (english) = Affect (french)

    I think the "cpInfoCurrentLocaleDateString" is limited to 15 digits ???... That is the source of our problem...

    And my solution works perfectly !...

    Thx Lieve to correct me !...

    ...

    Inspiring
    February 5, 2020

    I, too, am having this issue. In another course it was only cutting off the last digit of the year. However, I tried re-creating in a blank course and it cuts off even more. My Captivate is clearly bugged. It is not me, I swear, I am copying and pasting the variable, the double dollar signs are wrapped and Captivate is up-to-date. I will definitely be logging an issue with Captivate support.

    RodWard
    Community Expert
    Community Expert
    February 6, 2020

    Wrapping a variable name with double dollar signs does not give you any chance to configure how many characters are displayed when the variable's value is shown.  The default number is only 50 characters.  For best results you should insert the variable into the text container using the button provided in the Properties tab.  That will show a dialog box that then allows you to not only specify the variable to be displayed but also how many characters should be allowed.

     

    I think you will find that if you insert the variable this way and set the number of characters to something more generous (e.g. 100) then it will not be cut off.

    RodWard
    Community Expert
    Community Expert
    December 31, 2015

    If you're referring to how the date looks when the variable is inserted into a text caption, the issue may simply be that you need to allow a longer character maximum length when inserting the variable.

    The default is 50 characters now, but perhaps you need to set it to 100.

    Inspiring
    December 31, 2015

    Hi Rod

    Thanks for your response.

    Unfortunately not as you've noted, simply because I'm just using the system variable 'cpinfoCurrentLocaleDateString' so even with December being a rather long word it won't reach the 50 character limit because it should read '31 December 2015' but it reads '31 December 201'

    I've used the cut and paste from another project that displays it properly but when pasted it reads with exactly the same problem.

    Any other solutions?

    Inspiring
    December 31, 2015

    Hi Lilybiri

    No I changed the font using the same container... after your post I simply cut and pasted; unfortunately with the same result


    Hi Folks

    Just to add, I've just changed the font and reduced it quite dramatically and of course did the obvious of stretching out the text container with no result either.

    I'm not very good with variables, is there another way of getting the same result of 31 December 2015 for example... or can you good people come up with a solution using the system variable?