Storing Date as a String

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 :slight_smile:

1 Like

ok thanks, wasn’t too bad, it showed “Nov” in the date cell but when I retrieved it was converted as a number. I just had to consider the timezone and was able to get the time difference.