Author Topic: Custom DateTime codes Issues  (Read 1826 times)

0 Members and 1 Guest are viewing this topic.

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
Custom DateTime codes Issues
« on: September 19, 2014, 05:53:01 PM »
according to the wiki (http://voxcommando.com/mediawiki/index.php?title=Custom_DateTime_codes) we could use Microsoft formats for DtCustom ... however when I try

 {DtCustom.h}
or
 {DtCustom.H}

the command do not function  ... but using  {DtCustom.hh} or  {DtCustom.HH} it does work ...
When Voice command gets tough, use hand gestures

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2009
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Custom DateTime codes Issues
« Reply #1 on: September 19, 2014, 06:15:50 PM »
This is not a bug. You need to read the text quoted from Microsoft that is in the blue box. :)

In other words, you need to use:

{DtCustom. H}

or

{DtCustom. h}

or

{DtCustom.%H}

or

{DtCustom.%h}

etc.

The first two methods will add a space before the hour, however.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Custom DateTime codes Issues
« Reply #2 on: September 19, 2014, 06:16:56 PM »
I'm not really sure if I understand it correct, but in the Wiki is explained that you must use a space or percent for single time format like " h" or " H"  ::hmm


Quote
A custom date and time format string consists of two or more characters. Date and time formatting methods interpret any single-character string as a standard date and time format string. If they do not recognize the character as a valid format specifier, they throw a FormatException. For example, a format string that consists only of the specifier "h" is interpreted as a standard date and time format string. However, in this particular case, an exception is thrown because there is no "h" standard date and time format specifier.
To use any of the custom date and time format specifiers as the only specifier in a format string (that is, to use the "d", "f", "F", "g", "h", "H", "K", "m", "M", "s", "t", "y", "z", ":", or "/" custom format specifier by itself), include a space before or after the specifier, or include a percent ("%") format specifier before the single custom date and time specifier.
For example, "%h" is interpreted as a custom date and time format string that displays the hour represented by the current date and time value. You can also use the " h" or "h " format string, although this includes a space in the result string along with the hour. The following example illustrates these three format strings.

Argghhh, you are faster  :biglaugh
***********  get excited and make things  **********

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
Re: Custom DateTime codes Issues
« Reply #3 on: September 19, 2014, 08:26:00 PM »
hmmm ... never really understood what is in that blue box  :bonk :bonk

sounds like geeks English :D :D

my mistake ... but seriously I did not undertand that box ... maybe throwing clear examples in the wiki will help ...

finally my apology for a false bug report  ::) ::)

P.S. is that space is a requirement by some dlls in the back or it is due to VC ?
« Last Edit: September 19, 2014, 08:31:13 PM by Haddood »
When Voice command gets tough, use hand gestures

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2009
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Custom DateTime codes Issues
« Reply #4 on: September 19, 2014, 10:10:07 PM »
Quote
P.S. is that space is a requirement by some dlls in the back or it is due to VC ?
Follow the link on the wiki page . As mentioned, the wiki is quoting Microsoft.  The syntax is Microsoft 's.
« Last Edit: September 19, 2014, 10:14:58 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
Re: Custom DateTime codes Issues
« Reply #5 on: September 19, 2014, 10:29:46 PM »
Indeed ....

thanks for the help and sorry to bug you guys ...

maybe moderator will want to move this thread in the help forum
When Voice command gets tough, use hand gestures