mikij Posted November 11, 2008 Share Posted November 11, 2008 Hi, I have simple Date field in my database and it is returned in iReport query. But now I want to know which day is in that Date (e.g., 21/4/2008, is 21). I cannot do it with Calendar.getInstance()... because iReport doesn't allow two lines, and I cannot put this expression in just one line. How can I do this ? --Thank you in advance, Miki Link to comment Share on other sites More sharing options...
kchaudhry Posted November 12, 2008 Share Posted November 12, 2008 You can do this in your query. The following syntax will work with SQL Server and return the day. Code:select datepart(dd,yourdatefield) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now