# Fetch only first three characters

**URL:** <https://forum.kustom.rocks/t/fetch-only-first-three-characters/9687>\
**Category:** General\
**Tags:** kwgt, functions\
**Created:** [December 24, 2024, 6:33pm UTC](https://forum.kustom.rocks/t/fetch-only-first-three-characters/9687 "2024-12-24T18:33:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dun7ill](https://forum.kustom.rocks/letter_avatar_proxy/v4/letter/d/ce7236/32.png) [@dun7ill](https://forum.kustom.rocks/u/dun7ill)\
**Post date:** [December 24, 2024, 6:33pm UTC](https://forum.kustom.rocks/t/fetch-only-first-three-characters/9687/1 "2024-12-24T18:33:46Z")

</div>

Hello there,

I’ve been using the following code to get the Hijri month from an API link.

$wg(“[https://api.aladhan.com/v1/gToH?$df(dd/mm/yyyy)](https://api.aladhan.com/v1/gToH?$df(dd/mm/yyyy))”, json, “.data.hijri.month.en”)$

I need your assistance on how I can fetch only the first three characters of the month.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Baju\_Santiko](https://forum.kustom.rocks/user_avatar/forum.kustom.rocks/baju_santiko/32/6471_2.png) [@Baju\_Santiko](https://forum.kustom.rocks/u/Baju_Santiko)\
**Post date:** [December 24, 2024, 9:43pm UTC](https://forum.kustom.rocks/t/fetch-only-first-three-characters/9687/2 "2024-12-24T21:43:16Z")

</div>

> [@dun7ill](#):
>
> $wg(“[https://api.aladhan.com/v1/gToH?$df(dd/mm/yyyy)”](https://api.aladhan.com/v1/gToH?$df(dd/mm/yyyy)%E2%80%9D), json, “.data.hijri.month.en”)$

Hi there,

Try these code snippets:

Get the first 3 characters of a text

```auto
$
tc(cut, 
wg(“https://api.aladhan.com/v1/gToH?$df(dd/mm/yyyy)”, json, “.data.hijri.month.en”)
, 3)
$

```

Get the last 3 characters of a text

```auto
$
tc(cut, 
wg(“https://api.aladhan.com/v1/gToH?$df(dd/mm/yyyy)”, json, “.data.hijri.month.en”)
, -3)
$

```

I hope this would help.  
☺👍

---

<div class="post-metadata">

**Author:** ![Kylde](https://forum.kustom.rocks/user_avatar/forum.kustom.rocks/kylde/32/12_2.png) [@Kylde](https://forum.kustom.rocks/u/Kylde)\
**Post date:** [December 25, 2024, 1:34am UTC](https://forum.kustom.rocks/t/fetch-only-first-three-characters/9687/3 "2024-12-25T01:34:22Z")

</div>

Closed on December 25, 2024, 1:34am UTC


