Firebird Select Field From Table where Field = current_date

拈花ヽ惹草 提交于 2019-12-13 18:47:12

问题


I have a simply but fror me unsolveable question

I have this request:

Firebird Select Field From Table where Field = current_date

The problem is that this field is a text field an holds date in this format: 25.04.2014

How can i convert it that this questions works if it is the current date.


回答1:


SELECT fields FROM table WHERE field=
  substring(100+extract(day from current_date) from 2 for 2)
  || '.' ||
  substring(100+extract(month from current_date) from 2 for 2)
  || '.' ||
  extract(year from current_date)


来源:https://stackoverflow.com/questions/23145974/firebird-select-field-from-table-where-field-current-date

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!