how to add 90 days to expiry date or subtract 90 days from system date









up vote
-1
down vote

favorite












now just add 90 days with expiry date or subtract 90 days from system date. it will solve my problem! i want that the row color is red when 90 days left to item expiry date



 private void DgvStock_CellFormatting_1(object sender, DataGridViewCellFormattingEventArgs e)


foreach (DataGridViewRow row in DgvStock.Rows)


DateTime exp = Convert.ToDateTime(row.Cells["ExpDate"].Value);

if (exp <= System.DateTime.Now)

row.DefaultCellStyle.ForeColor = Color.White;
row.DefaultCellStyle.BackColor = Color.Red;












share|improve this question



















  • 4




    ....and what's not working for you? have tried something? have you looked at the functionality that DateTime provides?
    – Ofir Winegarten
    Nov 11 at 11:18










  • Do not process all the rows in that event - your app will seem sluggish and slow with more than a few rows of data. The event arguments tell you which row needs to be formatted
    – WelcomeOverflow
    Nov 11 at 15:50














up vote
-1
down vote

favorite












now just add 90 days with expiry date or subtract 90 days from system date. it will solve my problem! i want that the row color is red when 90 days left to item expiry date



 private void DgvStock_CellFormatting_1(object sender, DataGridViewCellFormattingEventArgs e)


foreach (DataGridViewRow row in DgvStock.Rows)


DateTime exp = Convert.ToDateTime(row.Cells["ExpDate"].Value);

if (exp <= System.DateTime.Now)

row.DefaultCellStyle.ForeColor = Color.White;
row.DefaultCellStyle.BackColor = Color.Red;












share|improve this question



















  • 4




    ....and what's not working for you? have tried something? have you looked at the functionality that DateTime provides?
    – Ofir Winegarten
    Nov 11 at 11:18










  • Do not process all the rows in that event - your app will seem sluggish and slow with more than a few rows of data. The event arguments tell you which row needs to be formatted
    – WelcomeOverflow
    Nov 11 at 15:50












up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











now just add 90 days with expiry date or subtract 90 days from system date. it will solve my problem! i want that the row color is red when 90 days left to item expiry date



 private void DgvStock_CellFormatting_1(object sender, DataGridViewCellFormattingEventArgs e)


foreach (DataGridViewRow row in DgvStock.Rows)


DateTime exp = Convert.ToDateTime(row.Cells["ExpDate"].Value);

if (exp <= System.DateTime.Now)

row.DefaultCellStyle.ForeColor = Color.White;
row.DefaultCellStyle.BackColor = Color.Red;












share|improve this question















now just add 90 days with expiry date or subtract 90 days from system date. it will solve my problem! i want that the row color is red when 90 days left to item expiry date



 private void DgvStock_CellFormatting_1(object sender, DataGridViewCellFormattingEventArgs e)


foreach (DataGridViewRow row in DgvStock.Rows)


DateTime exp = Convert.ToDateTime(row.Cells["ExpDate"].Value);

if (exp <= System.DateTime.Now)

row.DefaultCellStyle.ForeColor = Color.White;
row.DefaultCellStyle.BackColor = Color.Red;









c#






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 11 at 11:18









Barr J

5,7871930




5,7871930










asked Nov 11 at 11:16









Saud Khan

52




52







  • 4




    ....and what's not working for you? have tried something? have you looked at the functionality that DateTime provides?
    – Ofir Winegarten
    Nov 11 at 11:18










  • Do not process all the rows in that event - your app will seem sluggish and slow with more than a few rows of data. The event arguments tell you which row needs to be formatted
    – WelcomeOverflow
    Nov 11 at 15:50












  • 4




    ....and what's not working for you? have tried something? have you looked at the functionality that DateTime provides?
    – Ofir Winegarten
    Nov 11 at 11:18










  • Do not process all the rows in that event - your app will seem sluggish and slow with more than a few rows of data. The event arguments tell you which row needs to be formatted
    – WelcomeOverflow
    Nov 11 at 15:50







4




4




....and what's not working for you? have tried something? have you looked at the functionality that DateTime provides?
– Ofir Winegarten
Nov 11 at 11:18




....and what's not working for you? have tried something? have you looked at the functionality that DateTime provides?
– Ofir Winegarten
Nov 11 at 11:18












Do not process all the rows in that event - your app will seem sluggish and slow with more than a few rows of data. The event arguments tell you which row needs to be formatted
– WelcomeOverflow
Nov 11 at 15:50




Do not process all the rows in that event - your app will seem sluggish and slow with more than a few rows of data. The event arguments tell you which row needs to be formatted
– WelcomeOverflow
Nov 11 at 15:50












3 Answers
3






active

oldest

votes

















up vote
1
down vote













to add or substract days from current date you can do like this:



var date = DateTime.Now.AddDays(-90);


enter image description here



and change you code like:



if (exp <= System.DateTime.Now)

row.CellStyle.ForeColor = Color.White;
row.CellStyle.BackColor = Color.Red;

else

row.CellStyle.ForeColor = Color.Black;
row.CellStyle.BackColor = Color.White; // or some other origin color



looks like you using DefaultCellStyle incorrectly. DefaultCellStyle change style for all rows, but you need to change colors for specific row.






share|improve this answer






















  • it does not working
    – Saud Khan
    Nov 11 at 12:41










  • @SaudKhan as you can see 3 similar answer was provided by 3 different developers with high reputation. I am sure that problem in your usage if this function. Just quick example (see attached image in my anser)
    – Sergey Shulik
    Nov 11 at 12:49










  • i did as you send but it change all row color...
    – Saud Khan
    Nov 11 at 12:54










  • looks like you using DefaultCellStyle incorrectly. DefaultCellStyle change style for all rows, but you need to change colors for specific row. See my changes in answer. I don't remember exactly how to change styles in WinForms grid, so you need to find it by your self, but don't use DefaultCellStyle
    – Sergey Shulik
    Nov 11 at 13:04


















up vote
0
down vote













How about



if (exp <= System.DateTime.Now.AddDays(-90))
{
//...


P.S: I would move the DateTime.Now outside the loop and save it into a variable once.






share|improve this answer




















  • this is not working bro
    – Saud Khan
    Nov 11 at 12:40

















up vote
0
down vote













try this:



 foreach (DataGridViewRow row in DgvStock.Rows)

DateTime exp = DateTime.Parse(row.Cells["ExpDate"].Value + "");


if (exp <= System.DateTime.Today.AddDays(-90))

row.DefaultCellStyle.ForeColor = Color.White;
row.DefaultCellStyle.BackColor = Color.Red;

else


row.DefaultCellStyle.BackColor = Color.White;







share|improve this answer






















  • it does not working
    – Saud Khan
    Nov 11 at 12:24










  • you have to try updated my answer
    – Dhanushka Dayawansha
    Nov 11 at 12:43










  • when i write this as all row colors change to red in datagrid view foreach (DataGridViewRow row in DgvStock.Rows) DateTime ExpDate = Convert.ToDateTime(row.Cells["ExpDate"].Value); if (ExpDate >= System.DateTime.Now.AddDays(-90)) row.DefaultCellStyle.ForeColor = Color.White; row.DefaultCellStyle.BackColor = Color.Red;
    – Saud Khan
    Nov 11 at 12:46










  • DateTime ExpDate = Convert.ToDateTime(row.Cells["ExpDate"].Value); if (ExpDate >= System.DateTime.Now.AddDays(-90))
    – Saud Khan
    Nov 11 at 12:47










  • if condition like that if (ExpDate <= System.DateTime.Now.AddDays(-90))
    – Dhanushka Dayawansha
    Nov 11 at 12:48











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53248172%2fhow-to-add-90-days-to-expiry-date-or-subtract-90-days-from-system-date%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













to add or substract days from current date you can do like this:



var date = DateTime.Now.AddDays(-90);


enter image description here



and change you code like:



if (exp <= System.DateTime.Now)

row.CellStyle.ForeColor = Color.White;
row.CellStyle.BackColor = Color.Red;

else

row.CellStyle.ForeColor = Color.Black;
row.CellStyle.BackColor = Color.White; // or some other origin color



looks like you using DefaultCellStyle incorrectly. DefaultCellStyle change style for all rows, but you need to change colors for specific row.






share|improve this answer






















  • it does not working
    – Saud Khan
    Nov 11 at 12:41










  • @SaudKhan as you can see 3 similar answer was provided by 3 different developers with high reputation. I am sure that problem in your usage if this function. Just quick example (see attached image in my anser)
    – Sergey Shulik
    Nov 11 at 12:49










  • i did as you send but it change all row color...
    – Saud Khan
    Nov 11 at 12:54










  • looks like you using DefaultCellStyle incorrectly. DefaultCellStyle change style for all rows, but you need to change colors for specific row. See my changes in answer. I don't remember exactly how to change styles in WinForms grid, so you need to find it by your self, but don't use DefaultCellStyle
    – Sergey Shulik
    Nov 11 at 13:04















up vote
1
down vote













to add or substract days from current date you can do like this:



var date = DateTime.Now.AddDays(-90);


enter image description here



and change you code like:



if (exp <= System.DateTime.Now)

row.CellStyle.ForeColor = Color.White;
row.CellStyle.BackColor = Color.Red;

else

row.CellStyle.ForeColor = Color.Black;
row.CellStyle.BackColor = Color.White; // or some other origin color



looks like you using DefaultCellStyle incorrectly. DefaultCellStyle change style for all rows, but you need to change colors for specific row.






share|improve this answer






















  • it does not working
    – Saud Khan
    Nov 11 at 12:41










  • @SaudKhan as you can see 3 similar answer was provided by 3 different developers with high reputation. I am sure that problem in your usage if this function. Just quick example (see attached image in my anser)
    – Sergey Shulik
    Nov 11 at 12:49










  • i did as you send but it change all row color...
    – Saud Khan
    Nov 11 at 12:54










  • looks like you using DefaultCellStyle incorrectly. DefaultCellStyle change style for all rows, but you need to change colors for specific row. See my changes in answer. I don't remember exactly how to change styles in WinForms grid, so you need to find it by your self, but don't use DefaultCellStyle
    – Sergey Shulik
    Nov 11 at 13:04













up vote
1
down vote










up vote
1
down vote









to add or substract days from current date you can do like this:



var date = DateTime.Now.AddDays(-90);


enter image description here



and change you code like:



if (exp <= System.DateTime.Now)

row.CellStyle.ForeColor = Color.White;
row.CellStyle.BackColor = Color.Red;

else

row.CellStyle.ForeColor = Color.Black;
row.CellStyle.BackColor = Color.White; // or some other origin color



looks like you using DefaultCellStyle incorrectly. DefaultCellStyle change style for all rows, but you need to change colors for specific row.






share|improve this answer














to add or substract days from current date you can do like this:



var date = DateTime.Now.AddDays(-90);


enter image description here



and change you code like:



if (exp <= System.DateTime.Now)

row.CellStyle.ForeColor = Color.White;
row.CellStyle.BackColor = Color.Red;

else

row.CellStyle.ForeColor = Color.Black;
row.CellStyle.BackColor = Color.White; // or some other origin color



looks like you using DefaultCellStyle incorrectly. DefaultCellStyle change style for all rows, but you need to change colors for specific row.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 11 at 13:02

























answered Nov 11 at 11:19









Sergey Shulik

678824




678824











  • it does not working
    – Saud Khan
    Nov 11 at 12:41










  • @SaudKhan as you can see 3 similar answer was provided by 3 different developers with high reputation. I am sure that problem in your usage if this function. Just quick example (see attached image in my anser)
    – Sergey Shulik
    Nov 11 at 12:49










  • i did as you send but it change all row color...
    – Saud Khan
    Nov 11 at 12:54










  • looks like you using DefaultCellStyle incorrectly. DefaultCellStyle change style for all rows, but you need to change colors for specific row. See my changes in answer. I don't remember exactly how to change styles in WinForms grid, so you need to find it by your self, but don't use DefaultCellStyle
    – Sergey Shulik
    Nov 11 at 13:04

















  • it does not working
    – Saud Khan
    Nov 11 at 12:41










  • @SaudKhan as you can see 3 similar answer was provided by 3 different developers with high reputation. I am sure that problem in your usage if this function. Just quick example (see attached image in my anser)
    – Sergey Shulik
    Nov 11 at 12:49










  • i did as you send but it change all row color...
    – Saud Khan
    Nov 11 at 12:54










  • looks like you using DefaultCellStyle incorrectly. DefaultCellStyle change style for all rows, but you need to change colors for specific row. See my changes in answer. I don't remember exactly how to change styles in WinForms grid, so you need to find it by your self, but don't use DefaultCellStyle
    – Sergey Shulik
    Nov 11 at 13:04
















it does not working
– Saud Khan
Nov 11 at 12:41




it does not working
– Saud Khan
Nov 11 at 12:41












@SaudKhan as you can see 3 similar answer was provided by 3 different developers with high reputation. I am sure that problem in your usage if this function. Just quick example (see attached image in my anser)
– Sergey Shulik
Nov 11 at 12:49




@SaudKhan as you can see 3 similar answer was provided by 3 different developers with high reputation. I am sure that problem in your usage if this function. Just quick example (see attached image in my anser)
– Sergey Shulik
Nov 11 at 12:49












i did as you send but it change all row color...
– Saud Khan
Nov 11 at 12:54




i did as you send but it change all row color...
– Saud Khan
Nov 11 at 12:54












looks like you using DefaultCellStyle incorrectly. DefaultCellStyle change style for all rows, but you need to change colors for specific row. See my changes in answer. I don't remember exactly how to change styles in WinForms grid, so you need to find it by your self, but don't use DefaultCellStyle
– Sergey Shulik
Nov 11 at 13:04





looks like you using DefaultCellStyle incorrectly. DefaultCellStyle change style for all rows, but you need to change colors for specific row. See my changes in answer. I don't remember exactly how to change styles in WinForms grid, so you need to find it by your self, but don't use DefaultCellStyle
– Sergey Shulik
Nov 11 at 13:04













up vote
0
down vote













How about



if (exp <= System.DateTime.Now.AddDays(-90))
{
//...


P.S: I would move the DateTime.Now outside the loop and save it into a variable once.






share|improve this answer




















  • this is not working bro
    – Saud Khan
    Nov 11 at 12:40














up vote
0
down vote













How about



if (exp <= System.DateTime.Now.AddDays(-90))
{
//...


P.S: I would move the DateTime.Now outside the loop and save it into a variable once.






share|improve this answer




















  • this is not working bro
    – Saud Khan
    Nov 11 at 12:40












up vote
0
down vote










up vote
0
down vote









How about



if (exp <= System.DateTime.Now.AddDays(-90))
{
//...


P.S: I would move the DateTime.Now outside the loop and save it into a variable once.






share|improve this answer












How about



if (exp <= System.DateTime.Now.AddDays(-90))
{
//...


P.S: I would move the DateTime.Now outside the loop and save it into a variable once.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 11 at 11:26









Jannik

1,04821744




1,04821744











  • this is not working bro
    – Saud Khan
    Nov 11 at 12:40
















  • this is not working bro
    – Saud Khan
    Nov 11 at 12:40















this is not working bro
– Saud Khan
Nov 11 at 12:40




this is not working bro
– Saud Khan
Nov 11 at 12:40










up vote
0
down vote













try this:



 foreach (DataGridViewRow row in DgvStock.Rows)

DateTime exp = DateTime.Parse(row.Cells["ExpDate"].Value + "");


if (exp <= System.DateTime.Today.AddDays(-90))

row.DefaultCellStyle.ForeColor = Color.White;
row.DefaultCellStyle.BackColor = Color.Red;

else


row.DefaultCellStyle.BackColor = Color.White;







share|improve this answer






















  • it does not working
    – Saud Khan
    Nov 11 at 12:24










  • you have to try updated my answer
    – Dhanushka Dayawansha
    Nov 11 at 12:43










  • when i write this as all row colors change to red in datagrid view foreach (DataGridViewRow row in DgvStock.Rows) DateTime ExpDate = Convert.ToDateTime(row.Cells["ExpDate"].Value); if (ExpDate >= System.DateTime.Now.AddDays(-90)) row.DefaultCellStyle.ForeColor = Color.White; row.DefaultCellStyle.BackColor = Color.Red;
    – Saud Khan
    Nov 11 at 12:46










  • DateTime ExpDate = Convert.ToDateTime(row.Cells["ExpDate"].Value); if (ExpDate >= System.DateTime.Now.AddDays(-90))
    – Saud Khan
    Nov 11 at 12:47










  • if condition like that if (ExpDate <= System.DateTime.Now.AddDays(-90))
    – Dhanushka Dayawansha
    Nov 11 at 12:48















up vote
0
down vote













try this:



 foreach (DataGridViewRow row in DgvStock.Rows)

DateTime exp = DateTime.Parse(row.Cells["ExpDate"].Value + "");


if (exp <= System.DateTime.Today.AddDays(-90))

row.DefaultCellStyle.ForeColor = Color.White;
row.DefaultCellStyle.BackColor = Color.Red;

else


row.DefaultCellStyle.BackColor = Color.White;







share|improve this answer






















  • it does not working
    – Saud Khan
    Nov 11 at 12:24










  • you have to try updated my answer
    – Dhanushka Dayawansha
    Nov 11 at 12:43










  • when i write this as all row colors change to red in datagrid view foreach (DataGridViewRow row in DgvStock.Rows) DateTime ExpDate = Convert.ToDateTime(row.Cells["ExpDate"].Value); if (ExpDate >= System.DateTime.Now.AddDays(-90)) row.DefaultCellStyle.ForeColor = Color.White; row.DefaultCellStyle.BackColor = Color.Red;
    – Saud Khan
    Nov 11 at 12:46










  • DateTime ExpDate = Convert.ToDateTime(row.Cells["ExpDate"].Value); if (ExpDate >= System.DateTime.Now.AddDays(-90))
    – Saud Khan
    Nov 11 at 12:47










  • if condition like that if (ExpDate <= System.DateTime.Now.AddDays(-90))
    – Dhanushka Dayawansha
    Nov 11 at 12:48













up vote
0
down vote










up vote
0
down vote









try this:



 foreach (DataGridViewRow row in DgvStock.Rows)

DateTime exp = DateTime.Parse(row.Cells["ExpDate"].Value + "");


if (exp <= System.DateTime.Today.AddDays(-90))

row.DefaultCellStyle.ForeColor = Color.White;
row.DefaultCellStyle.BackColor = Color.Red;

else


row.DefaultCellStyle.BackColor = Color.White;







share|improve this answer














try this:



 foreach (DataGridViewRow row in DgvStock.Rows)

DateTime exp = DateTime.Parse(row.Cells["ExpDate"].Value + "");


if (exp <= System.DateTime.Today.AddDays(-90))

row.DefaultCellStyle.ForeColor = Color.White;
row.DefaultCellStyle.BackColor = Color.Red;

else


row.DefaultCellStyle.BackColor = Color.White;








share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 11 at 13:01

























answered Nov 11 at 11:43









Dhanushka Dayawansha

31119




31119











  • it does not working
    – Saud Khan
    Nov 11 at 12:24










  • you have to try updated my answer
    – Dhanushka Dayawansha
    Nov 11 at 12:43










  • when i write this as all row colors change to red in datagrid view foreach (DataGridViewRow row in DgvStock.Rows) DateTime ExpDate = Convert.ToDateTime(row.Cells["ExpDate"].Value); if (ExpDate >= System.DateTime.Now.AddDays(-90)) row.DefaultCellStyle.ForeColor = Color.White; row.DefaultCellStyle.BackColor = Color.Red;
    – Saud Khan
    Nov 11 at 12:46










  • DateTime ExpDate = Convert.ToDateTime(row.Cells["ExpDate"].Value); if (ExpDate >= System.DateTime.Now.AddDays(-90))
    – Saud Khan
    Nov 11 at 12:47










  • if condition like that if (ExpDate <= System.DateTime.Now.AddDays(-90))
    – Dhanushka Dayawansha
    Nov 11 at 12:48

















  • it does not working
    – Saud Khan
    Nov 11 at 12:24










  • you have to try updated my answer
    – Dhanushka Dayawansha
    Nov 11 at 12:43










  • when i write this as all row colors change to red in datagrid view foreach (DataGridViewRow row in DgvStock.Rows) DateTime ExpDate = Convert.ToDateTime(row.Cells["ExpDate"].Value); if (ExpDate >= System.DateTime.Now.AddDays(-90)) row.DefaultCellStyle.ForeColor = Color.White; row.DefaultCellStyle.BackColor = Color.Red;
    – Saud Khan
    Nov 11 at 12:46










  • DateTime ExpDate = Convert.ToDateTime(row.Cells["ExpDate"].Value); if (ExpDate >= System.DateTime.Now.AddDays(-90))
    – Saud Khan
    Nov 11 at 12:47










  • if condition like that if (ExpDate <= System.DateTime.Now.AddDays(-90))
    – Dhanushka Dayawansha
    Nov 11 at 12:48
















it does not working
– Saud Khan
Nov 11 at 12:24




it does not working
– Saud Khan
Nov 11 at 12:24












you have to try updated my answer
– Dhanushka Dayawansha
Nov 11 at 12:43




you have to try updated my answer
– Dhanushka Dayawansha
Nov 11 at 12:43












when i write this as all row colors change to red in datagrid view foreach (DataGridViewRow row in DgvStock.Rows) DateTime ExpDate = Convert.ToDateTime(row.Cells["ExpDate"].Value); if (ExpDate >= System.DateTime.Now.AddDays(-90)) row.DefaultCellStyle.ForeColor = Color.White; row.DefaultCellStyle.BackColor = Color.Red;
– Saud Khan
Nov 11 at 12:46




when i write this as all row colors change to red in datagrid view foreach (DataGridViewRow row in DgvStock.Rows) DateTime ExpDate = Convert.ToDateTime(row.Cells["ExpDate"].Value); if (ExpDate >= System.DateTime.Now.AddDays(-90)) row.DefaultCellStyle.ForeColor = Color.White; row.DefaultCellStyle.BackColor = Color.Red;
– Saud Khan
Nov 11 at 12:46












DateTime ExpDate = Convert.ToDateTime(row.Cells["ExpDate"].Value); if (ExpDate >= System.DateTime.Now.AddDays(-90))
– Saud Khan
Nov 11 at 12:47




DateTime ExpDate = Convert.ToDateTime(row.Cells["ExpDate"].Value); if (ExpDate >= System.DateTime.Now.AddDays(-90))
– Saud Khan
Nov 11 at 12:47












if condition like that if (ExpDate <= System.DateTime.Now.AddDays(-90))
– Dhanushka Dayawansha
Nov 11 at 12:48





if condition like that if (ExpDate <= System.DateTime.Now.AddDays(-90))
– Dhanushka Dayawansha
Nov 11 at 12:48


















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53248172%2fhow-to-add-90-days-to-expiry-date-or-subtract-90-days-from-system-date%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Barbados

How to read a connectionString WITH PROVIDER in .NET Core?

Node.js Script on GitHub Pages or Amazon S3