我有一个数据库(名为“all峎ubokings”),其中有一个名为“date”的列,在一个名为“bookings”的表中,该表以“dd/mm/yyyy”的形式存储日期,例如“16/10/2017”。我想用python编写一个函数来搜索特定月份的所有日期,并将其输出。例如,如果在存储在“2017年12月12日”、“2018年11月23日”和“2018年12月19日”的日期中,我希望输出12月的所有日期,我将如何执行此操作?我知道如何搜索一个特定的日期,只是不是一个特定的月份。如有任何帮助,我们将不胜感激。谢谢
Tags:
SUBSTR函数将执行您想要的操作。修改后做了OP评论中要求的事情。在
结果是:
^{pr2}$相关问题 更多 >
编程相关推荐