Hello,
I have written one server script and i want there current date so how i can get it??..we cant import in server script right ?
I am getting error…
Hello,
I have written one server script and i want there current date so how i can get it??..we cant import in server script right ?
I am getting error…
Hi @pm23:
Use frappe.utils.getdate()
All frappe.utils
functions are allowed.
Check this useful cheatsheet:
Hope this helps.
import package does not work on the server script doctype.
Format the date and time accordingly.
currentTime = frappe.db.sql(“”"
SELECT DATE_FORMAT(NOW(), ‘%Y-%m-%d %H:%i:%s’)
“”", as_dict=False)[0][0]