---
title: "Discussion on \"How to cast a string value as an integer in PowerShell\" | Hashnode"
description: "Discussion on \"How to cast a string value as an integer in PowerShell\". When numbers are stored as a string in a database, it is difficult to sort them, so they are readable to human users. PowerShell makes this operation simple, to take a string value, cast it as an integer, sort it by numeric value and create an output..."
url: "https://hashnode.com/posts/how-to-cast-a-string-value-as-an-integer-in-powershell/6384d29d749809fe25f7faf6"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to cast a string value as an integer in PowerShell](https://johneverettcase.com/how-to-cast-a-string-value-as-an-integer-in-powershell?utm_source=hashnode&utm_medium=feed)

When numbers are stored as a string in a database, it is difficult to sort them, so they are readable to human users. PowerShell makes this operation simple, to take a string value, cast it as an integer, sort it by numeric value and create an output...

Nov 28, 2022 · 1 min read · johneverettcase.com  
Read the article

-   [#powershell](https://hashnode.com/tag/powershell)
-   [#string](https://hashnode.com/tag/string)
-   [#integer](https://hashnode.com/tag/integer)

## Written by

[John Everett Case](https://hashnode.com/@johneverettcase)

@johneverettcase · Nebraska, US

  
[View profile](https://hashnode.com/@johneverettcase)

Developer, Writer

I am a developer from Nebraska in the US.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
