+1 800 256 3608 (toll-free in North America) or +49 7531 90 60 10| service@combit.com

Julian Date in Visual C++ Without CTime or COleDateTime

(combit Team) #1
Valid from List & Label 5
// Convert to Julian Date without CTime or COleDateTime

CString sExpression, sFieldAsJulian;
LPVOID pExpr;

// Create function tree
sExpression.Format("DateToJulian(Date(\"%25s\"))", (const char*)sField); //sField: dd.mm.yyyy
pExpr = LlExprParse(hJob, sExpression, FALSE);

// Evaluate expression
LlExprEvaluate(hJob, pExpr, sFieldAsJulian.GetBuffer(255), 255);
sFieldAsJulian.ReleaseBuffer();

// Free expression
LlExprFree(hJob, pExpr);
IDKBTE000540 KBTE000540