943,576 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Marked Solved
  • Views: 1381
  • C# RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Mar 4th, 2009
0

Re: Validation

Quote originally posted by Raskahil Fol ...
Why do you do this? This is not C. Predeclaration
I know this is an old habbit I got from my Modula-2 times.
Thanks for reminding me.
Reputation Points: 2023
Solved Threads: 644
Senior Poster
ddanbe is offline Offline
3,735 posts
since Oct 2008
Mar 4th, 2009
0

Re: Validation

That works well and outputs as

12 December, 1990

Which is great now all i need to do is make the program work out whether the day needs a th, nd, rd, st and make that output with the date.


i.e. the date should eventually output;

12th December 1990.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
foxypj is offline Offline
24 posts
since Mar 2009
Mar 4th, 2009
0

Re: Validation

Take a read of the helpfile, there are many date/time formats, its very simple, but you should start reading for yourself what options you have.
Reputation Points: 196
Solved Threads: 190
Posting Virtuoso
LizR is offline Offline
1,735 posts
since Aug 2008
Mar 4th, 2009
0

Re: Validation

Click to Expand / Collapse  Quote originally posted by LizR ...
Take a read of the helpfile, there are many date/time formats, its very simple, but you should start reading for yourself what options you have.
There is no default format to output in this way, hence why i am asking here.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
foxypj is offline Offline
24 posts
since Mar 2009
Mar 5th, 2009
0

Re: Validation

So you didnt look.
and before you say you did..

I typed

DateTime.ToString("dd mm yyyy");
placed cursor on ToString
Pressed F1

Got help
Clicked on the datetime format string stuff

http://msdn.microsoft.com/en-us/library/az4se3k1.aspx

which has a second link to

http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx

You are just plain lazy
Reputation Points: 196
Solved Threads: 190
Posting Virtuoso
LizR is offline Offline
1,735 posts
since Aug 2008
Mar 5th, 2009
0

Re: Validation

Click to Expand / Collapse  Quote originally posted by LizR ...
So you didnt look.
and before you say you did..

I typed

DateTime.ToString("dd mm yyyy");
placed cursor on ToString
Pressed F1

Got help
Clicked on the datetime format string stuff

http://msdn.microsoft.com/en-us/library/az4se3k1.aspx

which has a second link to

http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx

You are just plain lazy
i have to chuckle at that. I did look at this site. Please go ahead and highlight the part that tells me how to add th, nd, st, rd on the end of the day?

yes i can add 3 april, 2009 which i could already do. Go ahead and tell me how to add the rest of it. There is no default coding in C# that has that effect and no coding in that help file.

After looking carefully through the internet carefully. it seems the only way to do it is to write and array that uses mathematics to work out which day needs which suffix. i am struggling with this writing such an array.

I have had some very good help from others on this site maybe they will help me.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
foxypj is offline Offline
24 posts
since Mar 2009
Mar 5th, 2009
0

Re: Validation

It gets really tiring to see people who dont try and then expect others here to do the work. I know theres no date format that does the suffix, which is why I got you to look. If you google there are plenty of functions out there prewritten you can use to do it.

I too know theres no built in function to do it, it seems kind of a large oversight IMHO, but, there isnt. However, like most things like this, someone already has hit this and written something to do it. I got back a lot of hits with sensible code from google.
Reputation Points: 196
Solved Threads: 190
Posting Virtuoso
LizR is offline Offline
1,735 posts
since Aug 2008
Mar 5th, 2009
0

Re: Validation

Click to Expand / Collapse  Quote originally posted by LizR ...
It gets really tiring to see people who dont try and then expect others here to do the work. I know theres no date format that does the suffix, which is why I got you to look. If you google there are plenty of functions out there prewritten you can use to do it.

I too know theres no built in function to do it, it seems kind of a large oversight IMHO, but, there isnt. However, like most things like this, someone already has hit this and written something to do it. I got back a lot of hits with sensible code from google.
Yes of course you can google it. I have done this already. and yes i agree that it is a large oversight.

i apologise for the outburst at you. Just rather frustrated with the coding, and finding it awfully difficult. please accept my apologese. i am sorry that you feel like i have not tried. i think that is an unfair assumption on me. however that is something i will not discuss as you have no right to judge me in that.

i will have another look at google and hopefully this time i can understand some of the codes that i get hit with. i am sorry that what seemed like a lovely site at first has ended up making me feel pretty down about my coding.

cheers then

Foxypj
Reputation Points: 10
Solved Threads: 0
Newbie Poster
foxypj is offline Offline
24 posts
since Mar 2009
Mar 5th, 2009
0

Re: Validation

You don't need to feel down. It's just that people tend to get irritated and fed up with those who just come around here looking for ready answers. I'm sure you must have tried, but you didn't write anything about it. If you are stuck somewhere ask for help on that part and people here will gladly correct you.

I hope you don't go away from the forum. Give us some of your trials and we'll help you out the best we can. Do you really think it's fair for us, who has the answer to give it those who nothing of it. it'll not only make us fell uncomfortable to help but also harms those who doesn't try out.

Hope you understand.
Reputation Points: 40
Solved Threads: 12
Junior Poster
ChaseVoid is offline Offline
116 posts
since Aug 2007
Mar 6th, 2009
0

Re: Validation

Click to Expand / Collapse  Quote originally posted by ChaseVoid ...
You don't need to feel down. It's just that people tend to get irritated and fed up with those who just come around here looking for ready answers. I'm sure you must have tried, but you didn't write anything about it. If you are stuck somewhere ask for help on that part and people here will gladly correct you.

I hope you don't go away from the forum. Give us some of your trials and we'll help you out the best we can. Do you really think it's fair for us, who has the answer to give it those who nothing of it. it'll not only make us fell uncomfortable to help but also harms those who doesn't try out.

Hope you understand.
Thank you to everyone who has helped me. I have finally solved this program. Liz my sincere apologies for my outbursts.

The help here has been awesome from everybody. Thank you.

foxypj
Reputation Points: 10
Solved Threads: 0
Newbie Poster
foxypj is offline Offline
24 posts
since Mar 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: Trouble logging into sql server
Next Thread in C# Forum Timeline: Create library in web





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC