Using these lines of code:
from datetime import date self.date_start_processing = date.now()
I get this error:
AttributeError: object type 'datetime.date' does not have attribute 'now'
How can i solve this?
Thanks.
You need to use
import datetime now = datetime.datetime.now()
Or, if you are using django 1.4+ and have a time zone, you should use
django.utils.timezone.now()
Source: https://habr.com/ru/post/1469533/More articles:JavaFX - SWT interop: application freezes - javaCustom Backbone.js Event Switches - backbone.jsHow do I know which ole provider is available for SQL Server 2008? - sqlMono.Data.Sqlite.SqliteConnection.SetConfig throws a library using the wrong exception - androidDatabase disk image corrupted in MonoTouch - multithreadingHow to install BlockSize and KeySize using AES encription in java - javaWhich database uses rails 3 of the --sandbox console? - ruby-on-railsIs there a better way to convert itemidlist to a path string than SHGetPathFromIDList ()? - c ++DateTimePicker.selectedDate is different than DateTimePicker.Text - c #Verify that the output does not contain text - phpunitAll Articles