Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The date does not appear to be in a valid format
08-24-2021, 11:17 PM,
#8
RE: The date does not appear to be in a valid format
No, that won't help you as that is the database table configuration and this is a PHP error. As I said previously this error is generated by the ConvertSQLDate() function, which in turn is called by the GetPeriod() function from the GLBudgets.php script. The relevant code can be found at circa line 117.

PHP Code:
    $YearEndYear=Date('Y'YearEndDate($_SESSION['YearEnd'],0));

/* If the periods dont exist then create them */
    
for ($i=1$i <=36$i++) {
        
$MonthEnd=mktime(0,0,0,$_SESSION['YearEnd']+1+$i,0,$YearEndYear-2);
        
$period=GetPeriod(Date($_SESSION['DefaultDateFormat'],$MonthEnd), false);
        
$PeriodEnd[$period]=Date('M Y',$MonthEnd);
    } 


You are I think sending an incorrect parameter to GetPeriod(). Insert the following PHP instead of the above:

PHP Code:
    $YearEndYear=Date('Y'YearEndDate($_SESSION['YearEnd'],0));
    echo 
'Date Format - '$_SESSION['DefaultDateFormat'], '<br />';
    echo 
'YearEndYear - '$YearEndYear'<br />';
/* If the periods dont exist then create them */
    
for ($i=1$i <=36$i++) {
        
$MonthEnd=mktime(0,0,0,$_SESSION['YearEnd']+1+$i,0,$YearEndYear-2);
        echo 
'MonthEnd - '$MonthEnd'<br />';
        
$period=GetPeriod(Date($_SESSION['DefaultDateFormat'],$MonthEnd), false);
        
$PeriodEnd[$period]=Date('M Y',$MonthEnd);
    } 

and let  us know the output.


Tim
Reply


Messages In This Thread
RE: The date does not appear to be in a valid format - by TimSchofield - 08-24-2021, 11:17 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)