Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Date to integer?
#1
HI everyone,

I am looking to convert a date to integer, how do I go about this? column below
Qtr-Year
Mar-90	
Jun-90
Sep-90
Dec-90
Mar-91
do I first need to change the date format to '031990' etc then change it to a str then interger?

I appreciate any help
Thanks
Quote
#2
Convert it into a datetime object:
See here: https://python-forum.io/Thread-help-with...-to-Python

Or convert into a time object:
See here: https://docs.python.org/3.7/library/time.html
Quote
#3
better if year is firs and then month, e.g. 9003, 9006, etc. this will allow to sort the integers in correct order
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  building functions to validate strings , date etc metro17 2 128 Aug-08-2019, 12:42 PM
Last Post: ichabod801
  Best way of taking a date prefix from a line and forming a file path from it? Skaperen 5 247 Jul-22-2019, 11:50 PM
Last Post: Skaperen
  raw byte of integer jonnin 4 184 Jul-22-2019, 03:48 AM
Last Post: jonnin
  Pulling & Reading Date from UDF that Compare it to Live Data firebird 4 156 Jul-20-2019, 09:30 AM
Last Post: snippsat
  Substracting today's date from a date in column of dates to get an integer value firebird 1 141 Jul-04-2019, 06:54 PM
Last Post: Axel_Erfurt
  python cache for small integer Uchikago 1 269 Jun-27-2019, 05:32 PM
Last Post: ichabod801
  Error when entering letter/character instead of number/integer helplessnoobb 2 327 Jun-22-2019, 07:15 AM
Last Post: ThomasL
  Division of an integer into sub-numbers Richard_SS 4 279 Jun-14-2019, 11:47 AM
Last Post: DeaD_EyE
  Complex Integer saumyagoel 3 514 Jun-14-2019, 10:52 AM
Last Post: DeaD_EyE
  Date format issue the_dude 11 738 Jun-07-2019, 06:27 AM
Last Post: snippsat

Forum Jump:


Users browsing this thread: 1 Guest(s)