Link to home
Start Free TrialLog in
Avatar of funvill
funvillFlag for Canada

asked on

Converting a COleDateTime to and from a string

Hello experts

I have a string that I download from a database which holds a date
1039046400000 (the number of seconds from 1970)
I want to convert this string to a COleDateTime variable
After I do some work on the COleDateTime variable I want to convert it back in to a string ( the number of seconds from 1970 ).


My question is
How do I convert COleDateTime object to and from a string which contains the number of sec since 1970 ?

thank you for your time
Avatar of chensu
chensu
Flag of Canada image

1. COleDateTime --> string

COleDateTime::Format()

2. string --> COleDateTime

COleDateTime::ParseDateTime()
ASKER CERTIFIED SOLUTION
Avatar of mnashadka
mnashadka

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oops... I didn't read the question carefully.
Avatar of funvill

ASKER

Thank you mnashadka
it works great