Answered by:
Crystal Report Date Time Format

Question
-
User1109811461 posted
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
Tuesday, December 11, 2012 9:29 AM
Answers
-
User614805505 posted
Hi,
http://www.c-sharpcorner.com/UploadFile/mahesh/DateFormatInCR06132007092248AM/DateFormatInCR.aspx
Maybe this article can help you.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, December 12, 2012 7:44 AM -
User1109811461 posted
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)"- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, December 12, 2012 6:07 PM
All replies
-
User614805505 posted
Hi,
http://www.c-sharpcorner.com/UploadFile/mahesh/DateFormatInCR06132007092248AM/DateFormatInCR.aspx
Maybe this article can help you.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, December 12, 2012 7:44 AM -
User-1716253493 posted
set hour=none, minute=none second=noneWednesday, December 12, 2012 8:21 AM -
User1109811461 posted
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)"- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, December 12, 2012 6:07 PM