Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Need to build date to display in a form by joining it as follows

1. Extract the Day from the End Date field

2. Join it to the Month and Year fields to generate a new date below

   End Date        Month     Year      ||  Date to Display
--------------------------------------------------------------
Jan 12 2008         6        2010       |  Jun  12  2010 
Feb 16 2009         8        2011       |  Aug  16  2011
Apr 20 2012         5        2013       |  May  20  2013


The new date will be displayed in the form the other fields

a. End date
b. Month
c. year

are also displayed on the form.



Please note

Month 6  = Jun
Month 8  = Aug
Month 5  = May


Thanks

[edit]Code block added - OriginalGriff[/edit]
Posted
Updated 21-Nov-14 20:13pm
v8
Comments
Laiju k 22-Nov-14 1:54am    
what is your issue
OriginalGriff 22-Nov-14 1:57am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
So we have no idea where the data is coming from, where you need to do the conversion (could be C#, javascript, SQL - we don't know your system) or how you are loading the HTML display - assuming it is web-based as your tags suggest.
Use the "Improve question" widget to edit your question and provide better information.

1 solution

Please see: http://msdn.microsoft.com/en-us/library/system.datetime%28v=vs.110%29.aspx[^].

Seriously. And look at the constructors. And do pay some attention.

Good luck.

—SA
 
Share this answer
 
Comments
Maciej Los 22-Nov-14 4:10am    
+5
Sergey Alexandrovich Kryukov 22-Nov-14 16:06pm    
Thank you, Maciej.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900