Bad Date Format String Error Crystal Report
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring bad date format string details errorkind developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question
Cdate Function In Crystal Reports
x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; crystal reports convert yyyymmdd string to date it only takes a minute: Sign up Bad date format string string error up vote 0 down vote favorite I created an asp application with crystal report. In that dates are stored as varchar in sql, and pass that
String To Date Crystal Reports
value as string from asp to crystal report. Here that string format is converted to date by using Datevalue function. But i try to execute the report it shows bad date format string error. date format stored in sql is 'dd/mm/yyyy' How to convert the string to date value in crystal report crystal-reports crystal-reports-2008 crystal-reports-2010 share|improve this question asked Feb 21 '14 at 9:52 Gopi 49613 Why not converting the string date to date before sending it crystal reports bad time format string to the crystal report. Make sure you are not passing null and empty. –Iti Tyagi Mar 3 '14 at 10:26 add a comment| 3 Answers 3 active oldest votes up vote 0 down vote accepted try this.. "From : " & ToText(Minimum({?date}), "dd/MM/yyyy") & " To :" & ToText(Maximum({?date}), "dd/MM/yyyy") If the datetime is in field (not a formula) then you can format it: Right click on the field -> Format Editor Date and Time tab Select date/time formatting you desire (or click customize) If the datetime is in a formula: ToText({MyDate}, "dd/MMM/yyyy") //Displays 31/Jan/2010 or ToText({MyDate}, "dd/MM/yyyy") //Displays 31/01/2010 or ToText({MyDate}, "dd/MM/yy") //Displays 31/01/10 etc... share|improve this answer answered Feb 21 '14 at 9:56 Kapil 5063928 add a comment| up vote 0 down vote use the string conversion to date CDate ("17/02/2014") or CDate(<
+ Analytics Conference: Oct 18, Mastering SAP BI, Melbourne: Oct 23. Cystal Report - Bad Date Format String Search this topic...|Search Crystal Reports...|Search Box Select
Crystal Reports Date Format
a search Explain These Choices... --------------------Recent Topics (All Forums) Unanswered Posts Register or Login to Post Forum Index -> Building Reports -> Crystal Reports Author Message Ryoni88Forum MemberJoined: 21 Oct 2008Posts: 2 Posted: Tue Oct 21, 2008 9:25 amPost subject: Cystal Report - Bad Date Format String I have a string date which I am trying to format as a date. http://stackoverflow.com/questions/21930853/bad-date-format-string-string-error (DD/MM/YYYY) I've tried using cdate ({@Date}) & I've also tried converting the date to (MM/DD/YYYY) first by using cdate(Mid({@Date},4,2) & "/" & Left({@Date},2) & "/" & right({@Date},4)) I keep getting an error 'Bad Date Format String' Can anyone please help me.. [/quote] Back to top JBrayPrincipal MemberJoined: 15 Jul 2008Posts: 364Location: Phoenix Posted: Tue Oct 21, 2008 12:19 pmPost subject: Re: Cystal Report http://www.forumtopics.com/busobj/viewtopic.php?t=119725 - Bad Date Format String CDate is a little picky. You need to know you data well. More than likely, some of the data for this field is empty or null. Try checking in your formula with something like: IF IsNull({field}) or Trim({field}) = "" Then #01/01/1900# Else CDate({field}; I prefer using the Date Time String functions in Crystal. You might want to play with DTStoDate (). You'll need an input with time, but you can just concatenate that if you don't have it. Make sure you have a space between the date and time, though._________________Senior Technical Consultant InfoSol, Inc. http://www.infosol.com Back to top Jay HackenbrachtForum MemberJoined: 30 Oct 2008Posts: 29Location: Dallas TX Posted: Thu Oct 30, 2008 10:42 pmPost subject: Re: Cystal Report - Bad Date Format String In Crystal syntax: totext({table.datetimefield},'dd/MM/yyyy') ; Back to top Ryoni88Forum MemberJoined: 21 Oct 2008Posts: 2 Posted: Fri Oct 31, 2008 3:08 amPost subject: Re: Cystal Report - Bad Date Format String Thanks guys I think a combination of the 2 seems to have sorted this problem. Back to top Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Mont
Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help https://www.experts-exchange.com/questions/26296740/Crystal-Reports-2008-Cdate-problem-Bad-Date-Format-String.html Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > Crystal Reports 2008 Cdate problem Bad Date Format String Want to Advertise Here? Solved Crystal Reports 2008 Cdate crystal report problem Bad Date Format String Posted on 2010-06-30 Crystal Reports 1 Verified Solution 11 Comments 1,761 Views Last Modified: 2012-05-09 Hi guys, Hope you can help. I have a sub report to which parameters are passed from the main report. This involves two formula fields startdate and enddate (date format) two parameter fields startdate and enddate (date bad date format type) the fields are linked to the sub report and formulas used seem fine. When i try and run the main report i get the error Bad Date Format String and then it flashes up the formula field {CalDateDateFormat} and highlights the formula for this which is CDate({Calibrations.Cal_Da