08-22-2008 01:58 PM
08-25-2008 10:17 AM
Hello Mande,
Could you post a small snippet of code that demonstrates the behavior you are seeing on Vista so that I can try and duplicate this?
08-26-2008 08:46 AM - edited 08-26-2008 08:47 AM
Hello Mande,
I just ran a quick test on my Vista machine, and %w returned 2 as the day of the week (convenient that today happened to be Tuesday... ) The piece of code that I used is as follows:
#define DATETIME_FORMATSTRING "%I:%M%p %w, %B %d, %Y"
...
static double currDateTime;
static int bufferLen;
static char *dateTimeBuffer = NULL;
switch (event)
GetCurrentDateTime (&currDateTime);
bufferLen = FormatDateTimeString (currDateTime, DATETIME_FORMATSTRING, NULL, 0);
dateTimeBuffer = malloc (bufferLen + 1);
FormatDateTimeString (currDateTime, DATETIME_FORMATSTRING, dateTimeBuffer, bufferLen + 1 );
SetCtrlAttribute(panelHandle, PANEL_TEXTMSG, ATTR_CTRL_VAL, dateTimeBuffer);
free(dateTimeBuffer);
If you could perhaps post a small snippet of code that does not seem to be working for you, I would be happy to have a look at it.
NickB
National Instruments
09-02-2008 07:08 PM
Thank you for your test, I did not get email about the response so I hadn't checked it until now.
I ran your code on my machine and I was given the response below. Today is Tuesday but I was given the day as zero.
Time Test: 05:04PM 0, September 02, 2008
My CVI version returns Version 8.0.0 (273)
Thanks.
09-03-2008 09:11 AM
Hello Mande,
From this KnowledgeBase article here we see that CVI 8.0.0 is not supported on Windows Vista. One thing you can try that might work is to install the latest version of the run time from our website (8.5.1, link). As I mentioned, I am not positive that this will work but it's a possible solution that does not take long to try and you should have no problems since the run time is backwards compatible.