Wolfram: Date Time
Date Object
DateObject[]
-
return current local date
DateObject[ ] (* sample value DateObject[{2023, 12, 5, 10, 47, 43.1793343`9.387850814365704}, Instant, Gregorian, -8.] *)
DateObject[{year, month, date, hour, minutes, seconds}]
-
- return a date object.
- The arguments are all integers.
- Any of the smaller time unit can be omitted.
Now
-
return a
DateObject
of current date and time.Now (* DateObject[{2022, 7, 17, 13, 51, 20.2956073`9.059976985734098}, Instant, Gregorian, -7.] *)
Date String
DateString[]
-
return current datetime string.
DateString[ ] (* Mon 22 Nov 2021 21:25:08 *)
DateString[date]
-
convert date to string.
DateString[date, format]
-
use format. Named format includes the following and more, see example:
DateString[ DateObject[{2022,7,17,14,20,58}] , "ISODate" ] (* 2022-07-17 *) DateString[ DateObject[{2022,7,17,14,20,58}] , "ISODateTime" ] (* 2022-07-17T14:20:58 *) DateString[ DateObject[{2022,7,17,14,20,58}] , "Time" ] (* 14:20:58 *) DateString[ DateObject[{2022,7,17,14,20,58}] , "Date" ] (* Sunday 17 July 2022 *) DateString[ DateObject[{2022,7,17,14,20,58}] , "DateShort" ] (* Sun 17 Jul 2022 *) DateString[ DateObject[{2022,7,17,14,20,58}] , "DateTime" ] (* Sunday 17 July 2022 14:20:58 *) DateString[ DateObject[{2022,7,17,14,20,58}] , "DateTimeShort" ] (* Sun 17 Jul 2022 14:20:58 *)
WolframLang, Shell Scripting Tasks
- Wolfram: Shell Scripting Tasks
- Wolfram: Navigate Directory
- Wolfram: List Files (Walk Directory)
- Wolfram: File Path Functions
- Wolfram: Delete Dir
- Wolfram: is File or Dir
- Wolfram: File Exist
- Wolfram: Get File Date
- Wolfram: Get File Size
- Wolfram: Print File Content
- Wolfram: Get File Hash
- Wolfram: Read File
- Wolfram: Read File from Web
- Wolfram: Write File
- Wolfram: Load a Package or File
- Wolfram: Get Environment Variable
- Wolfram: Date Time
- Wolfram: Find Replace Script