Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ms-access/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ms access MS Access将文本转换为短日期_Ms Access - Fatal编程技术网

Ms access MS Access将文本转换为短日期

Ms access MS Access将文本转换为短日期,ms-access,Ms Access,大家好我有个问题 我在表中有一个字段,它是一个文本字段,我想把它转换成日期字段。虽然其中的所有值都是日期格式,但由于某些情况,更改并不方便 因此,我需要将文本字段更改为日期字段,以便进行比较或验证 我正在使用MS access SQL进行此项目,请帮助我 我试过了 TRANSFORM Count(Registrants.[Field1]) AS CountOfField1 SELECT Registrants.[Country] , Count(Registrants.[Field1]) AS

大家好我有个问题

我在表中有一个字段,它是一个文本字段,我想把它转换成日期字段。虽然其中的所有值都是日期格式,但由于某些情况,更改并不方便

因此,我需要将文本字段更改为日期字段,以便进行比较或验证

我正在使用MS access SQL进行此项目,请帮助我

我试过了

TRANSFORM Count(Registrants.[Field1]) AS CountOfField1
SELECT Registrants.[Country] , Count(Registrants.[Field1]) AS [Total Of Field1]
FROM Registrants
WHERE Cast(Registrants.Field1 As Date) Between #15/6/2014# AND # 30/8/2014#
GROUP BY Registrants.[Country]
PIVOT Format([Field1]);

Cast
在MS Access sql中不存在

改用
DateValue

WHERE DateValue(Registrants.Field1) Between #15/6/2014# AND #30/8/2014#
有关示例用法和语法,请参见

另外,我在你第二次约会时注意到了一个空格,我想这是打字错误