Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

4
LINES

< > BotCompany Repo | #1035658 // ymdHMSToTimestamp

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (9547L/54K).

static Timestamp ymdHMSToTimestamp(int year, int month, int day, int hour, int minute, int second, TimeZone tz usual default) ctex {
  ret new Timestamp(simpleDateFormat("y/M/d H:m:s", tz)
    .parse(year + "/" + month + "/" + day + " " + hour + ":" + minute + ":" + second));
}

Author comment

Began life as a copy of #1028559

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): elmgxqgtpvxh, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035658
Snippet name: ymdHMSToTimestamp
Eternal ID of this version: #1035658/1
Text MD5: a6b4007e35c5909f309c15f200227fb3
Transpilation MD5: 48439746bd21d4d61a929a3c42092468
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-07-01 04:11:03
Source code size: 281 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 90 / 109
Referenced in: [show references]