# User Input - is there a variable to use within the Query

**URL:** <https://community.pickaxe.co/t/user-input-is-there-a-variable-to-use-within-the-query/503>\
**Category:** General\
**Created:** [July 16, 2024, 4:36pm UTC](https://community.pickaxe.co/t/user-input-is-there-a-variable-to-use-within-the-query/503 "2024-07-16T16:36:19Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![ab2308](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.pickaxe.co/ab2308/32/1542_2.png) [@ab2308](https://community.pickaxe.co/u/ab2308)\
**Post date:** [October 16, 2024, 10:57pm UTC](https://community.pickaxe.co/t/user-input-is-there-a-variable-to-use-within-the-query/503/6 "2024-10-16T22:57:02Z")

</div>

Hi @landed

You can use a custom action and add a library for the date and time?

Something like

```auto
import os
import datetime
import pytz

def current_time_and_date(: str):
    """
    Return the current time and date

    Args:
         (string): 
    Envs:
         (string): 
    """

    # Insert your PYTHON code below. You can access environment variables using os.environ[].
    # Currently, only the requests library is supported, but more libraries will be available soon.
    # Use print statements or return values to display results to the user.
    # If you save a png, pdf, csv, jpg, webp, gif, or html file in the root directory, it will be automatically displayed to the user.
    # You do not have to call this function as the bot will automatically call and fill in the parameters.

    # Get current time in UTC
    utc_time = datetime.datetime.now(pytz.utc)
    print(utc_time)

    # Convert to a specific timezone (e.g., Australia/Melbourne)
    melbourne_time = utc_time.astimezone(pytz.timezone('Australia/Melbourne'))
    print(melbourne_time)

```

---

_[View the full topic](https://community.pickaxe.co/t/user-input-is-there-a-variable-to-use-within-the-query/503)._
