How to read & write date stored in text file?
| Fri, 2007-08-17 07:36 | |
|
Hello, I'm developing one appliaction. I want to make this application as trial version for 5 days. I'm trying to use date compare logic. At the time of installation, i'm creating one Text file which remains on C:\ drive. TTime time;Now i want to store date in Text file. How to write this date in file? RFs session;Whenever next time user opens application, i'm again accessing current date & comapring this with date stored in text file. So please let me know how to write date in text file & |
|






Forum posts: 285
>>HOW TO WRITE THIS DATE IN FILE??
Convert datetime to descriptor using TTime::FormatL and use RFile:Write to write to a file.
>>HOW TO COMPARE "expiry_date" & "current_date"??
Use TTime::Set (For this to work you should store in a specific format. check out help for more info) to set the datetime read from file which is in the form of descriptor. Use += and >= operators of TTime to add interval and compare.
Cheers,
Sri
Forum posts: 5
Or you can simply use fopen, fprintf, etc. They are supported even in OS 6.
Forum posts: 37
Did you succed in making a trial version? I am planning to do a trial version for our product Digital lotus
http://www.softwaremarket.nokia.com/?action=productDetails&pID=5124&pmsid=283&lang=en¤cy=USD
without using Openbit.