do you happen to have a sample code on how to subtract day tomorrow or 2 days from today? And then I will multiply it by a number depending on its reserved value. I am figuring how to operate a hotel checking in and show its price by asking when the customer checks out, so the price will be ready upon checking in
Asked
Active
Viewed 193 times
0
-
WPF is a presentation framework. I'm sure that you are writing your code in either VB.net or C#. Please specify which. – Klaus Byskov Pedersen Oct 25 '10 at 11:55
1 Answers
2
This should help:
var rate = 100.00;
var totalDays = 2;
var startDate = DateTime.Today.AddDays(-totalDays );
var total = totalDays * rate;
Console.WriteLine("rate: {0} totalDays : {1} startDate: {2} total: {3}",
rate, totalDays, startDate, total);

mhttk
- 1,688
- 1
- 16
- 29