Hi
I have One BOOK Published On 1/1/2010
I have to add 35days after the book pubdate which is less than GETDATE()
Plz help me how to write date time function for this
Thanks
Actually i want datetime function for this statement
ALL past due customers that have a balance on at least one contracts that is 35 days after the pub date.
or else plz write datetime function for the above question
I have One BOOK Published On 1/1/2010
I have to add 35days after the book pubdate which is less than GETDATE()
Plz help me how to write date time function for this
Thanks
Actually i want datetime function for this statement
ALL past due customers that have a balance on at least one contracts that is 35 days after the pub date.
or else plz write datetime function for the above question
VulpesPosted Dec 29, 2011, 6:22 AM
WHERE DATEADD(day, 35, pubDate) < GETDATE()
karthik parchaPosted Dec 29, 2011, 6:20 AM
thank you for replying to my question
i want to write dateadd function in sqlserver
plz can you write for me
karthik parchaPosted Dec 29, 2011, 6:19 AM
thank you for replying to my question
i want to write dateadd function in sqlserver
can you write for me
Prasant JinagaPosted Dec 29, 2011, 6:18 AM
the function will be
datetime dt=pubDate.Adddays(35);
Thanks,
Prasant
Satyapriya NayakPosted Dec 29, 2011, 6:13 AM
Try this...
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
DateTime dt = DateTime.Parse("1 / 1 / 2010");
dt = dt.AddDays(35);
MessageBox.Show(dt.ToString("MM/dd/yyyy"));
}
}
}
Thanks