Help...

Posted By: Cecia

Help... - 10/12/07 23:42

Can you tell me how i can create a string of sys_date in format (dd/mm/yyyy).
I needed it to save in a field in MySQL.

T's
Posted By: Fenriswolf

Re: Help... - 10/13/07 17:31

Hi,

you can use the predefined variables sys_day etc. and combine them by converting their values into string format (str_for_num) and using other str_ commands like str_cat.
Posted By: rvL_eXile

Re: Help... - 10/13/07 18:32

Here the Code Snippet (Works)

Code:

string date_day_str;
string date_month_str;
string date_year_str;
string dot_str=".";
string double_dot_str=":";


function highscore
{
mySQL_Connectdb("candyman3d","db4free.net","candyman3d","candyman3d");
if(!mySQL_IsConnected())
{
beep; Error("Verbindung konnte nicht hergestellt werden");
exit; // Connection failed, exit to windows.
}
str_for_num(date_day_str,sys_day);
str_cat(date_day_str,dot_str);
str_for_num(date_month_str,sys_month);
str_cat(date_month_str,dot_str);
str_for_num(date_year_str,sys_year);
str_cat(date_day_str,date_month_str);
str_cat(date_day_str,date_year_str);




cYa Sebastian
Posted By: Cecia

Re: Help... - 10/17/07 01:35

thank's
© 2023 lite-C Forums