Answers for "DateTimeField change format"

0

DateTimeField change format

class UserSerializer(serializers.ModelSerializer):
   date_joined = serializers.DateTimeField(format="<Your format>")

class Meta:
    model = User
    fields = ('username', 'email', 'first_name', 'last_name', 'is_superuser', 'is_staff', 'is_active','get_absolute_url')
Posted by: Guest on September-07-2020

Code answers related to "DateTimeField change format"

Browse Popular Code Answers by Language