What I’m trying to do:
Trying to store date as as string in a text in a table. Anvil identifies my string as a date and tries to store it as a date in a text column. Is there a way to override this and continue to store as a string?
I’m using the pendulum library and want to stick to their standard and not have to convert back and forth between “Nov” and 11 for my month.
If x
is a datetime
object, str(x)
is a string.
If you don’t like the default string representation, you have control over the format by using strftime
or an f-string.
I don’t know pendulum, but considering that they say “python datetime made easy”, chances are pendulum itself can help you converting to string
1 Like