Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DateTime variable and IStringMap
#1
I am in need to build an IStringMap structure, with key computer time. I understand that it is only strings that this structure may accommodate. Therefore, how should I convert :

Quote:x.FromComputerTime

to store it in IStringMap and have structure sorted by time.

I have tried storing :
Quote:_s=x

the correct DateTime value is stored and sorted by I failed in finding a way to convert this string back to DateTime.

Any advice is mostly appreciated.
#2
Macro Macro2365
Code:
Copy      Help
DateTime x y
x.FromComputerTime

;convert DateTime to string to store in IStringMap
str s=x

;code skipped: add s to IStringMap, get s from IStringMap

;convert string to DateTime
y=val(s 1)

;result
out y.ToStr
#3
Many thanks indeed! I am sorry, I missed the val statement.
Best personal regards.


Forum Jump:


Users browsing this thread: 1 Guest(s)