Question

Locked

Create own Date Time in Visual Studio

By jeffreyalejo ·
I have created a Window Based Application using Visual Studio 2008. All the necessary Date entry in the whole Project are dependent on the system date.

I have done the following testings:

1. For example, the Date today is October 20,2009. If I made a transaction for today, it will have a transaction date of October 20,2009.

2. Now, I adjusted the System Date to October 19,2009. I made another transaction and the transaction date is equal to October 19,2009 which is supposed to be equal to October 20,2009 since the date today is October 20,2009.

My question is, is there any possible way for an application to have its own Date/Time to avoid being dependent on the System Date/Time?

Thanks in advance!

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

depends

by jck In reply to Create own Date Time in V ...

System storable? No. The OS only holds one time and zone setting.

Programmably? Yes. You can store an offset of the current system date/time (zone/year/month/day/hour/min/sec) that you want for your system. Then, entries can be stored and adjusted according to your software-stored parameters and matched accordingly to real-world time.

Collapse -

Sort of

by Tony Hopkinson In reply to Create own Date Time in V ...

A bit of lateral thinking based on what I think you are saying you want.

Would be not to use the system clock at all, and simply have a place to store and maintain the date.

So at its; simplest you had a little UI function with transaction sdata in it and then you use that date in recording transactions.

Whne you want to enter them for a nother day, you change the transaction date, and on y va.

The usual way to attack this sort of thing is, is to open a 'day', do your stuff and them close the 'day', ie move to to the next one by default.

Collapse -

System clock...

by jeffreyalejo In reply to Sort of

Thanks for the reply.

Yes. I don't want to use the system clock to avoid wrong date values if the system clock has invalid date.

Back to Windows Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums