-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathLesson13_Date_Functions.sc
46 lines (45 loc) · 2.31 KB
/
Lesson13_Date_Functions.sc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# This data file was generated by the Spreadsheet Calculator Improvised (sc-im)
# You almost certainly shouldn't edit it.
newsheet "Sheet1"
movetosheet "Sheet1"
format A 60 2 0
format B 20 2 0
format C 4 2 0
format D 62 2 0
format 18 2
leftstring A0 = "NOTE: THE date_expr IS A UNIX TIMESPAMP"
leftstring A2 = "1. Go to B2. Type =@now [=@now]"
leftstring D2 = "Return current time encoded as seconds from epoch"
leftstring A3 = "2. Go to B3. Type =@year(@now) [=@year({date_expr})]"
leftstring D3 = "Return year of the date expression"
leftstring A4 = "3. Go to B4. Type =@month(@now) [=@month({date_expr})]"
leftstring D4 = "Return month of the date expression"
leftstring A5 = "4. Go to B5. Type =@day(@now) [=@day({date_expr})]"
leftstring D5 = "Return day of the date expression"
leftstring A6 = "5. Go to B6. Type =@hour(@now) [=@hour({date_expr})]"
leftstring D6 = "Return hour of the date expression"
leftstring A7 = "6. Go to B7. Type =@minute(@now) [=@minute({date_expr})]"
leftstring D7 = "Return minute of the date expression"
leftstring A8 = "7. Go to B8. Type =@second(@now) [=@second({date_expr})]"
leftstring D8 = "Return second of the date expression"
label A11 = "@date({date_expr}, {format})"
leftstring A13 = "8. Go to B13. Type \\"@date(B2, \"%d/%m/%Y\")"
leftstring D13 = "Convert time in seconds from epoch to date string using format"
leftstring A15 = "9. Go to B15. Type =@dts(1992, 4, 14)"
leftstring D15 = "Return seconds of 14/04/1992 since epoch"
leftstring A16 = "10. Go to B16. Type =@dts(1992, 14, 2)"
leftstring D16 = "Return seconds of 14/04/1992 since epoch"
leftstring A18 = " NOTE: sc-im accepts both (y,m,d) or (m,d,y) format but\n former is preffered"
leftstring A20 = "11. Go to B20. Type \\"@date(@dts(1992, 14, 2), \"%d/%m/%y\")"
leftstring A22 = "12. Go to B22. Type =@tts(2,23,43)"
leftstring D22 = "Return number of seconds since midnight"
leftstring A25 = "13. Go to B25. Type \2021/9/23"
leftstring D25 = "Enter date in string format"
leftstring A26 = "14. At B25, Type :datefmt \"%m-%d-%y\""
leftstring D26 = "Convert string value to UNIX timestamp"
leftstring A29 = "15. Go to B29. Type =@now. Type :format \"d%D\""
leftstring D29 = "Format Seconds from epoch to date string"
cellcolor A0 "fg=RED bg=BLACK bold=1"
cellcolor A11 "fg=RED bg=BLACK bold=1"
cellcolor A18 "fg=RED bg=BLACK bold=1"
goto A0