Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2008

Tip: Looking for answers? Try searching our database.

date and time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Marcelo Bettencourt - 04 Mar 2008 08:50 GMT
How do I know the date and time and Visual C + + format

Date: months: Year
PvdG42 - 04 Mar 2008 16:42 GMT
> How do I know the date and time and Visual C + + format
>
> Date: months: Year

For ISO standard C++...
<quote>
The C++ standard does not say anything about this, other than to adopt
the C standard function by reference.  Here is what the C standard
says, from the 1999 C update:

      7.23.2.4  The time function

      Synopsis

      [#1]

              #include <time.h>
              time_t time(time_t *timer);

      Description

      [#2] The time function determines the current calendar time.
      The encoding of the value is unspecified.

And here is the definition of the time_t type:

      [#3] The types declared are size_t (described in 7.17);

              clock_t

      and

              time_t

      which  are  arithmetic  types capable of representing times;

Standard C, and therefore standard C++, do not specify what arithmetic
type (could be signed or unsigned long, (or long long in C), or float
or double or long double.  No definition is imposed as to what the
resolution or base time is at all.

It is not portable to make any assumptions at all about a time_t, or
to do anything with it other than pass it to functions defined to
accept it, like ctime().

The POSIX standard, observed on most UNIX systems, specifies that
time() returns the number of seconds since 1-Jan-1970 in an
arithmetic, but again does not specify which arithmetic type or
whether it is integral or floating point.  Note that POSIX is an
extension to the C and C++ language standards.

An implementation that expresses time in seconds elapsed since
1-Jan-1900 is perfectly acceptable to ANSI/ISO C and C++, if not to
POSIX.
</quote>

If you are using C++/CLI with .NET, search the MSDN library for "date and
time".

http://msdn2.microsoft.com/en-us/netframework/default.aspx

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.