我有SCN:
localstack
我可以将其转换为时间戳记:
worker_startup
当我要混合使用这两种方法时,请选择“我收到错误消息”:
SELECT TIMESTAMP_TO_SCN(SYSTIMESTAMP) SCN FROM DUAL;
SELECT SCN_TO_TIMESTAMP(6480157) FROM DUAL;
答案 0 :(得分:4)
请使用
Private Sub Cashier_Load(sender As Object, e As EventArgs) Handles MyBase.Load
GetItemName()
End Sub
Public Sub GetItemName()
Dim dt As New DataTable
Using cn As New MySqlConnection("Your connection string")
Using cmd As New MySqlCommand("Select ItemName From menuitem", cn)
cn.Open()
dt.Load(cmd.ExecuteReader)
End Using
End Using
Dim arr As String() = dt.AsEnumerable().Select(Function(x) x.Field(Of String)("ItemName")).ToArray()
ListBox2.Items.AddRange(arr)
End Sub
答案 1 :(得分:2)
@ F.Madsen给出了正确和最简单的答案,但仅出于说明目的,您可以按照自己的逻辑得出结果:
SELECT SCN_TO_TIMESTAMP(SCN) FROM
(
SELECT (TIMESTAMP_TO_SCN(SYSTIMESTAMP)) SCN FROM DUAL
);