PDA

View Full Version : String


MarianaA
11-21-2007, 06:39 AM
If I am storing the date the user enters how I can know what the month day and year is.
Ex: November 20, 2007
Can some one help me to code that?
Thanks

abduraooft
11-21-2007, 08:01 AM
You have to specify the language that you are using. Are you trying to get the system date?

Spookster
11-21-2007, 08:05 AM
Depends on what you are providing them as a means of inputting the date? If you restrict their input to a specific format by means of say a form then you should easily be able to determine that. If you are just allowing them to type it on the command line then you can parse the string and determine if it is in a format that you want and determine the information otherwise tell the user that what they entered is not in the proper format. You really don't want to allow input of the users choosing and then try to parse a date from that.

MarianaA
11-21-2007, 08:34 AM
You have to specify the language that you are using. Are you trying to get the system date?

The language is C++