Skip to content

How to add time field #17250

Answered by uglyliu
uglyliu asked this question in Q&A
Apr 29, 2023 · 1 comments · 8 replies
Discussion options

You must be logged in to vote

You should use to_timestamp() and either parse_timestamp() or format_timestamp() rather than trying to manipulate it as a string.

It should be less error prone.

use to_timestamp and format_timestamp is done, thank u very much

.timestamp = now()
.unix_time,error = to_int(format_timestamp!(.timestamp, format: "%s"))
.utc8_time = .unix_time
.currentdate = format_timestamp!(to_timestamp!(.utc8_time), format: "%Y.%m.%d")

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@uglyliu
Comment options

@spencergilbert
Comment options

@uglyliu
Comment options

@uglyliu
Comment options

Answer selected by spencergilbert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants