RuleGo RuleGo
🏠Home
  • Quick Start
  • Rule Chain
  • Standard Components
  • Extension Components
  • Custom Components
  • Visualization
  • RuleGo-Server
  • RuleGo-MCP-Server
  • AOP
  • Trigger
  • Advanced Topics
  • Performance
  • Standard Components
  • Extension Components
  • Custom Components
  • Components Marketplace
  • Overview
  • Quick Start
  • Routing
  • DSL
  • API
  • Options
  • Components
🔥Editor (opens new window)
  • RuleGo Editor (opens new window)
  • RuleGo Server (opens new window)
  • StreamSQL
  • Github (opens new window)
  • Gitee (opens new window)
  • Changelog (opens new window)
  • English
  • 简体中文
🏠Home
  • Quick Start
  • Rule Chain
  • Standard Components
  • Extension Components
  • Custom Components
  • Visualization
  • RuleGo-Server
  • RuleGo-MCP-Server
  • AOP
  • Trigger
  • Advanced Topics
  • Performance
  • Standard Components
  • Extension Components
  • Custom Components
  • Components Marketplace
  • Overview
  • Quick Start
  • Routing
  • DSL
  • API
  • Options
  • Components
🔥Editor (opens new window)
  • RuleGo Editor (opens new window)
  • RuleGo Server (opens new window)
  • StreamSQL
  • Github (opens new window)
  • Gitee (opens new window)
  • Changelog (opens new window)
  • English
  • 简体中文

广告采用随机轮播方式显示 ❤️成为赞助商
  • Quick Start

  • Rule Chain

  • Standard Components

  • Extension Components

  • Custom Components

  • Components marketplace

  • Visualization

  • AOP

  • Trigger

  • Advanced Topic

  • RuleGo-Server

  • FAQ

  • Endpoint Module

  • Support

  • StreamSQL

    • Overview
    • Quick Start
    • Core Concepts
    • SQL Reference
    • API Reference
    • RuleGo Integration
    • functions

      • Aggregate Functions
      • Analytical Functions
      • Window Functions
      • Math Functions
      • String Functions
      • Conversion Functions
        • Basic Conversion Functions
          • CAST - Type Conversion Function
          • HEX2DEC - Hex to Decimal Function
          • DEC2HEX - Decimal to Hex Function
        • Encoding Conversion Functions
          • ENCODE - Encoding Function
          • DECODE - Decoding Function
          • URL_ENCODE - URL Encoding Function
          • URL_DECODE - URL Decoding Function
        • Time Conversion Functions
          • CONVERT_TZ - Timezone Conversion Function
          • TO_SECONDS - Convert to Seconds Function
        • Other Conversion Functions
          • CHR - Character Function
          • TRUNC - Truncate Function
        • 📚 Related Documentation
      • DateTime Functions
      • JSON Functions
      • Hash Functions
      • Array Functions
      • Type Check Functions
      • Conditional Functions
      • Multi-row Functions
      • Expression Functions
      • Custom Functions
    • case-studies

目录

Conversion Functions

# StreamSQL Conversion Functions

Conversion functions are used for data type conversion.

# Basic Conversion Functions

# CAST - Type Conversion Function

Syntax: cast(value as type)
Description: Converts a value to the specified type.

# HEX2DEC - Hex to Decimal Function

Syntax: hex2dec(hex_str)
Description: Converts a hexadecimal string to a decimal number.

# DEC2HEX - Decimal to Hex Function

Syntax: dec2hex(number)
Description: Converts a decimal number to a hexadecimal string.

# Encoding Conversion Functions

# ENCODE - Encoding Function

Syntax: encode(str, encoding)
Description: Encodes a string according to the specified encoding.

# DECODE - Decoding Function

Syntax: decode(str, encoding)
Description: Decodes a string according to the specified encoding.

# URL_ENCODE - URL Encoding Function

Syntax: url_encode(str)
Description: Performs URL encoding on a string.

# URL_DECODE - URL Decoding Function

Syntax: url_decode(str)
Description: Performs URL decoding on a string.

# Time Conversion Functions

# CONVERT_TZ - Timezone Conversion Function

Syntax: convert_tz(datetime, from_tz, to_tz)
Description: Converts datetime from one timezone to another.

# TO_SECONDS - Convert to Seconds Function

Syntax: to_seconds(datetime)
Description: Converts datetime to seconds.

# Other Conversion Functions

# CHR - Character Function

Syntax: chr(number)
Description: Converts an ASCII code to a character.

# TRUNC - Truncate Function

Syntax: trunc(number, [precision])
Description: Truncates a number to the specified precision.

# 📚 Related Documentation

  • String Functions - Learn detailed usage of string functions
  • DateTime Functions - Learn detailed usage of datetime functions
  • SQL Reference - View complete SQL syntax reference
Edit this page on GitHub (opens new window)
Last Updated: 2025/08/05, 02:24:31
String Functions
DateTime Functions

← String Functions DateTime Functions→

Theme by Vdoing | Copyright © 2023-2025 RuleGo Team | Apache 2.0 License

  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式