Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datetime problem
Message
From
09/07/1998 22:10:24
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00115857
Message ID:
00115985
Views:
11
>I need some help I have a field that is a Datetime field and I need to subtract just time from it the time that I'm subtracting is in a string what is the best way to attack this problem
>
>
>Thanks
>
>Greg



Hi, Try to download my cDateTime.zip at:

http://members.tripod.com/~justok/cdatetime.zip OR
http://members.xoom.com/justok/cdatetime.zip



My View on DateTime is Date + Time.....

CarryDate = TTOD(WholeDateTime)
LeftTime = WholeDateTime - DTOT(CarryDate)
* As take zero on time when transform

So, you can do it separately!

Thanks, David. I have put some of his Date Control feature on it..
Such as YeaR, MontH for 1st day of year, month....

2nd, You can directly Add or subtract a digit on DateTime or Date!!

e.g. {1998/11/17} + 1 == {1998/11/18} !!
and {1998/11/17 03:05:44} + 1 == {1998/11/17 03:05:44}

That is:
to Hour +1 or -1, Use 3600 to add/subtract
to Minute +1 or -1, Use 60 to add/subtract
to Second +1 or -1, Use 1 to add/subtract

Of cos, you can use 86400 for a Day... but a little bit crazy! ~_^

After you divide DateTime into Date and Time...
Everything is happy and you can control it easily...

For more funny feature on it... pls download cdatetime.zip
and see.... hee hee. I have 'N' std for Noon Function..
that is reset the leftTime to 43200...
Therefore, it can assign datetime with easy!

p.s. this is designed for having controlsouce, if no, try DateTime() as
controlsource to test..
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Previous
Reply
Map
View

Click here to load this message in the networking platform