Hi,
since I'm a noob at programming, i got stuck trying to write a script that shall eventually convert CSV pricedata to BAR Files.
I got stuck right at the beginning where i want to convert normal Timestamps/Date to OLE format. I try to use the WindowsAPI
Quote:

#include <default.c>
#include <stdio.h>
#include <windows.h>

typedef struct _SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME;


void main()
{
int WINAPI SystemTimeToVariantTime(SYSTEMTIME* lpSystemTime, double* pvtime);
int WINAPI VariantTimeToSystemTime(double* pvtime, SYSTEMTIME* lpSystemTime);

SYSTEMTIME st,lt,xt;
double vtime;

GetSystemTime(&st);
GetLocalTime(&lt);

printf("The system time is: %02d:%02d",st.wHour, st.wMinute);
printf("\n");
printf("The local time is: %02d:%02d", lt.wHour, lt.wMinute);
printf("\n");

SystemTimeToVariantTime(&st,&vtime);

printf("VariantTime is: %02f",vtime);
printf("\n");

VariantTimeToSystemTime(&vtime,&xt);

printf("Reconverted Time is: %02d:%02d",xt.wHour,xt.wMinute);
printf("\n");
}


I can't seem to get the SystemTimeToVariantTime right. It produces an error all the time.
Any hints would be nice. I suspected the Struct to be wrong, or some pointer wrongly initialized, but I'm new to programming, especially windowsAPI creeps me out:)