Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 1 KB

binary-fromtext.md

File metadata and controls

44 lines (32 loc) · 1 KB
title ms.date ms.service ms.reviewer ms.topic author ms.author
Binary.FromText | Microsoft Docs
12/12/2018
powerquery
gepopell
reference
dougklopfenstein
bezhan

Binary.FromText

Syntax

Binary.FromText(text as nullable text, optional encoding as nullable number) as nullable binary

About

Returns the result of converting text value text to a binary (list of number). encoding may be specified to indicate the encoding used in the text value. The following BinaryEncoding values may be used for encoding.

  • BinaryEncoding.Base64: Base 64 encoding
  • BinaryEncoding.Hex: Hex encoding

Example 1

Decode "1011" into binary.

Binary.FromText("1011")
Binary.FromText("1011", BinaryEncoding.Base64)

Example 2

Decode "1011" into binary with Hex encoding.

Binary.FromText("1011", BinaryEncoding.Hex)
Binary.FromText("EBE=", BinaryEncoding.Base64)