you can try django-filters also for more complex use cases
https://django-filter.readthedocs.io/en/stable/

On Sat, 23 Jul 2022 at 22:09, Lakshyaraj Dash <dashlakshyaraj2...@gmail.com>
wrote:

> You can do something like shown in the screenshot below
>
> Thanks and Regards
> Lakshyaraj Dash
>
> On Sat, Jul 23, 2022, 21:59 Mahendra <avulamahen...@gmail.com> wrote:
>
>>
>>
>> On Fri, 22 Jul 2022, 23:37 Prashanth Patelc, <prashanthpat...@gmail.com>
>> wrote:
>>
>>> how to use time in pandas  (convert 24 hours time to 12 hours)
>>>
>>> Login time  table
>>> ==========
>>> userid     logindate              logintime
>>> 2            2022-13-07      18:30:00.490337
>>>
>>> Logout time table
>>> ==========
>>>
>>> userid     logindate              logintime
>>> 2            2022-14-07      02:36:03.450327
>>>
>>>
>>> output:
>>>    login_date          user__username       user              diiffrences
>>> 0  2022-07-14          neil                        neil               -1
>>> days +07:26:47.027887
>>>
>>> How to convert above atbles time:  ?
>>>
>>> nee output like this type
>>> ==============
>>>      login_date          user__username       user
>>>  diiffrences
>>> 0  2022-07-14          neil                        neil
>>> 08:03:47.027887
>>>
>>>
>>>
>>> df['logout_time'] = pd.to_timedelta(df['logout_time'].astype(str))
>>>
>>> df['login_time'] = pd.to_timedelta(df['login_time'].astype(str))
>>>
>>>
>>> df['diiffrences'] = df['logout_time'] - df['login_time']
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAMCU6CpwW9q9z_pBdgf%3Do5dEzvET5qqvddopjNQtGwuxm5RUjA%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAMCU6CpwW9q9z_pBdgf%3Do5dEzvET5qqvddopjNQtGwuxm5RUjA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAN-6G3xoKQ4g5a8LtTGGwPJw1LSVXK2aGNwKcDKAHqsV0mb%3DKA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAN-6G3xoKQ4g5a8LtTGGwPJw1LSVXK2aGNwKcDKAHqsV0mb%3DKA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAF7qQgCYQ%2Bcj6X__4f5%2BPVNjmix_xszhc2b%2B%2BCa9EiK2NWR60Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAF7qQgCYQ%2Bcj6X__4f5%2BPVNjmix_xszhc2b%2B%2BCa9EiK2NWR60Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGp2JVGg63dp%2Bt8fMgF9SJ7Z%2BUDygzCiJ2dQtY6bh94Jeu1gAA%40mail.gmail.com.

Reply via email to