Problem with registration date
#9

Set your column REGISTRO type Varchar, and use this function to get Date and Hour



PHP код:
Before Main()
new 
Meses[12][11] =    { {"Enero"}, {"Febrero"}, {"Marzo"}, {"Abril"}, {"Mayo"}, {"Junio"}, {"Julio"}, {"Agosto"}, {"Septiembre"}, {"Octubre"}, {"Noviembre"}, {"Diciembre"} };
ReturnDate()
{
    static 
date[36] ;
    
getdate(date[2], date[1], date[0]);
    
gettime(date[3], date[4], date[5]);
    
date[1]--;
        
    if(
date[3] < 12){
        
format(datesizeof(date), "%02d %s %d, %02d:%02d AM "date[0], Meses[date[1]], date[2], date[3], date[4]);
    }
    else if(
date[3] > 12){
        
date[3] = date[3]-12;
        
format(datesizeof(date), "%02d %s %d, %02d:%02d PM"date[0], Meses[date[1]], date[2], date[3], date[4]);
    }
    else if(
date[3] == 12){
        
format(datesizeof(date), "%02d %s %d, %02d:%02d PM"date[0], Meses[date[1]], date[2], date[3], date[4]);
    }
    return 
date;

Reply


Messages In This Thread
Problem with registration date - by BrianFaria - 29.01.2017, 20:39
Re: Problem with registration date - by BrianFaria - 29.01.2017, 21:46
Re: Problem with registration date - by saffierr - 29.01.2017, 22:09
Re: Problem with registration date - by BrianFaria - 29.01.2017, 23:20
Re: Problem with registration date - by saffierr - 29.01.2017, 23:55
Re: Problem with registration date - by BrianFaria - 30.01.2017, 01:03
Respuesta: Problem with registration date - by Eloy - 30.01.2017, 01:34
Re: Problem with registration date - by BrianFaria - 30.01.2017, 01:44
Respuesta: Problem with registration date - by Eloy - 30.01.2017, 02:17
Re: Problem with registration date - by BrianFaria - 30.01.2017, 02:33

Forum Jump:


Users browsing this thread: 1 Guest(s)