返回首页

gbase数据、南大通用产品文档:GBase8srtoday() 函数

更新日期:2024年09月11日

rtoday() 函数返回系统日期作为 long integer 值。

语法
void rtoday(today)
int4 *today;
today
指向接收内部 DATE 的 int4 值的指针。

用法
rtoday() 函数取得客户机计算机上的系统日期,而不是服务器计算机上的。

示例
demo 目录在 rtoday.ec 文件中包含此样例程序。
/*
* rtoday.ec *
The following program obtains today's date from the system,
converts it to ASCII using rdatestr(), and displays the result.
*/

#include

main()
{
mint errnum;

GBase 8s ESQL/C 编程指南
南大通用数据技术股份有限公司
- 909 -
char today_date[20];
int4 i_date;

printf("RTODAY Sample ESQL Program running.\n\n");

/* Get today's date in the internal format */
rtoday(&i_date);
/* Convert date from internal format into a mm/dd/yyyy string */
if ((errnum = rdatestr(i_date, today_date)) == 0)
printf("\n\tToday's date is %s.\n", today_date);
else
printf("\n\tError %d in converting date to mm/dd/yyyy\n", errnum);

printf("\nRTODAY Sample Program over.\n\n");
}
输出

RTODAY Sample ESQL Program running.

Today's date is 09/16/2007.

RTODAY Sample Program over.

node (172.168.83.14)
Recover begin

图形化的查询和管理工具,提供用于访问、控制和管理集群环境。使用
GBase 8a MPP Cluster 企业管理器可以完成如下工作:
1) 集群连接配置管理;
2) 元数据信息查询和管理;
3) SQL、存储过程、自定义函数的开发、执行。