Parsing String date and time as a Date in HP Asset Manager
I am trying to parse a string as a date and time field,but the format is not working properly. I am using the below logic to parse the string as a date.
lErr1 = amSetFieldDateValue(hRecord1,"LastJobRunDate",ParseDate(ExtractValue(JobRunTimeDateTemp," "), "yyyy-MM-dd'T'HH:mm:ss.S"))
Can any body tell me how to parse the string as a date and time IN hpam.
ParseDate() as defined in the programmer's reference guide does not show time capability. Have you tried LocalToBasicTimeStamp()? Also, the use of ExtractValue() seems to pre-parse just the date portion instead of the entire date-time value so not sure why this is being used when you are explicitly trying to format for time portion. Have you tried FormatDate()?