On Wed, Nov 4, 2020 at 6:21 PM Steve <Gronicus@sga.ninja> wrote:
>
> The text File entry is:
>    BPd 2020-11-04 17:28:03.352027  66
>
> I bring it into the program using:
> with open("_TIME-DATE.txt" , 'r') as infile:
>      for lineEQN in infile: # loop to find each line in the file for that
> dose
> and set it in a variable as follows:
> ItemDateTime = lineEQN[7:36].strip()
>
> When I print ItemDateTime, it looks like:
>       2020-11-04 17:28:03.352027
>
> How do I display it as "Wednesday, November 4, 2020 5:28pm" ?

Look at strptime/strftime
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to