thanks for reply, i got the answer after try so many times....i'm using basic crystal report bulit in in Ms Visual Studio 2008, i need to convert the date into varchar on my query, and on my dataset(i'm using dataset to generate my report) the data type
i change from datetime to string...
after that i got as what i want..
i share my query below for future references maybe:
Dim strsql As String = "SELECT MaklumatPelajar.Nama,MaklumatPelajar.NoIc,KesalahanDisiplin.KategoriKes,KesalahanDisiplin.SubKes,convert(varchar(10),KesalahanDisiplin.TarikhKes,103) as TarikhKes,KesalahanDisiplin.AduanOleh,MaklumatPelajar.Kelas"
& _
" FROM MaklumatPelajar INNER JOIN KesalahanDisiplin ON MaklumatPelajar.IdPelajar = KesalahanDisiplin.IdPelajar" & _
" WHERE KesalahanDisiplin.KategoriKes = '" & getSessionKategori & "' AND KesalahanDisiplin.SubKes = '" & getSessionSubKategori & "' AND kesalahandisiplin.TarikhKes between convert(datetime, '" + getStartDate + "',103) AND convert(datetime,'" + getEndDate +
"',103)"
afastars
Member
52 Points
221 Posts
Crystal Report Date Time Format
Dec 11, 2012 01:29 PM|LINK
hi all expertise
i'm using build in crystal report in visual studio 2008, i want to set date in crystal report, now the date appear like this 12-02-2012 12:00:00AM
i need to display date only, trying so hard to find the way to change the format
but no luck so far..need help from expertise here
CruzerB
Contributor
5399 Points
1098 Posts
Re: Crystal Report Date Time Format
Dec 12, 2012 11:44 AM|LINK
Hi,
http://www.c-sharpcorner.com/UploadFile/mahesh/DateFormatInCR06132007092248AM/DateFormatInCR.aspx
Maybe this article can help you.
My Technical Blog
oned_gk
All-Star
35728 Points
7296 Posts
Re: Crystal Report Date Time Format
Dec 12, 2012 12:21 PM|LINK
Suwandi - Non Graduate Programmer
afastars
Member
52 Points
221 Posts
Re: Crystal Report Date Time Format
Dec 12, 2012 10:07 PM|LINK
hi CruzerB oned_gk
thanks for reply, i got the answer after try so many times....i'm using basic crystal report bulit in in Ms Visual Studio 2008, i need to convert the date into varchar on my query, and on my dataset(i'm using dataset to generate my report) the data type i change from datetime to string...
after that i got as what i want..
i share my query below for future references maybe:
Dim strsql As String = "SELECT MaklumatPelajar.Nama,MaklumatPelajar.NoIc,KesalahanDisiplin.KategoriKes,KesalahanDisiplin.SubKes,convert(varchar(10),KesalahanDisiplin.TarikhKes,103) as TarikhKes,KesalahanDisiplin.AduanOleh,MaklumatPelajar.Kelas" & _
" FROM MaklumatPelajar INNER JOIN KesalahanDisiplin ON MaklumatPelajar.IdPelajar = KesalahanDisiplin.IdPelajar" & _
" WHERE KesalahanDisiplin.KategoriKes = '" & getSessionKategori & "' AND KesalahanDisiplin.SubKes = '" & getSessionSubKategori & "' AND kesalahandisiplin.TarikhKes between convert(datetime, '" + getStartDate + "',103) AND convert(datetime,'" + getEndDate + "',103)"