Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
HELP ... How can I make a date out of the long received by LL_AssocGetDate (Livelink LAPI)????
Vincent_Reip_(HermesAdmin_(Delete)_1627986)
With LL_GetObjectInfo I receive an assoc object,where I can get information out...Call LL_AssocGetInteger(outobjinfo, "ID", TheId)works OK...Call LL_AssocGetDate(outobjinfo, "CreateDate", TheDate)Returns a Long (932039320)...Does anyone know how to make a readable date out of this Date Value Object???I really need to know this, I am Stuck...Many thanks in advance, Tim
Find more posts tagged with
Comments
Michael_Oliver_(MorningstarAdmin_(Delete)_1424285)
Tim, I wrestled with this one too. You didn't specify language, so I'll demonstrate what you have to do in VB:Dim TheLongDate, LivelinkDate, LivelinkDateString As LongDim VBDateString As StringLL_ValueAlloc...status = LL_AssocGetDate(assocname, "CreateDate", TheLongDate)status = LL_ValueSetDate(LivelinkDate, TheLongDate)status = LL_ValueGetFormatted(LivelinkDate, LivelinkDateString)status = LL_ValueGetString(LivelinkDateString, buf, bufLen, outSize)VBDateString = Left$(buf, outSize)LL_ValueFree...So, in short, getting a date that Livelink returns entails these 4 steps:1. Use LL_AssocGetDate and place the value in a long.2. Use LL_ValueSetDate to transfer the value to a livelink date (another long).3. Use LL_GetFormatted to make a livelink string out of it (still a long).4. Use LL_ValueGetString to retrieve the VB string.I usually wrap the last 3 steps in a function that takes a long and returns the date string.-DarrynMorningstar Systems, Inc.dgraham@mstarsys.com