format date

This commit is contained in:
CHIEFSOFT\ameye
2023-08-30 20:19:01 -04:00
parent aafe46c650
commit 5ccbc4cb91
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -308,7 +308,7 @@ long WrenchSampleTasks(CVars in, CVars &out){
return ret;
}
//,to_char(last_login, 'Day Mon dd, yyyy HH:MI AM')
long WrenchFamilyList(CVars in, CVars &out){
logfmt(logINFO, "ENTER CALL long WrenchFamilyList");
char vname[30];
@@ -323,7 +323,7 @@ long WrenchFamilyList(CVars in, CVars &out){
res = pgsql_query("SELECT id FROM members_family WHERE member_id = %lu AND status=1 ", in["member_id"].Long());
out["total_record"] = pgsql_num_rows(res);
res = pgsql_query(" SELECT * FROM members_family WHERE member_id = %lu AND status=1 "
res = pgsql_query(" SELECT *,to_char(last_login, 'Day Mon dd, yyyy HH:MI AM') AS last_login_formatted FROM members_family WHERE member_id = %lu AND status=1 "
" ORDER BY id DESC LIMIT %lu OFFSET %lu", in["member_id"].Long(), limit, offset);
if (res != NULL && pgsql_num_rows(res) > 0) {
@@ -351,7 +351,7 @@ long WrenchFamilyList(CVars in, CVars &out){
out[vname] = rec["age"];
snprintf(vname, sizeof (vname), "last_login_%05d", i);
out[vname] = rec["last_login"];
out[vname] = rec["last_login_formatted"];
snprintf(vname, sizeof (vname), "task_count_%05d", i);
out[vname] = rec["task_count"];
+1 -1
View File
@@ -506,7 +506,7 @@ class ResultFormatter extends Model
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"total_record" => ($total),
"internal_return" => $out["internal_return"],
"result_list" => array(),
"categories" => $this->dummyCategory(),