Can you please tell me how to convert dates from the format: " 5 minutes ago , today at 10:00 pm , yesterday at 7:45 pm " in UnixTime? In language C # Thank you!

  • 2
    You describe the entire input format. "10 minutes before KVN" - suitable? "Last Friday, the 13th, the year before last, midnight" - suitable? - VladD
  • @VladD, apparently, there are just 3 different time indexes described by words. And they can only have two formats - X {секунд, минут, часов} назад (relative time) and {сегодня, вчера, позавчера} в XX:XX (relative day and exact time) - Sergey Rufanov
  • Guys, this is actually VKontakte, in any group, if we go in, we will see that the time when the post was posted, at the beginning of the tape, has exactly this format. I need to convert it to a normal format, ideally in Unixtime. - Alexander
  • one
    @Alexander: You understand that the description of the format “such as on VKontakte” is no better than the description of the date “a week before Easter.” Guessing the rules by which VKontakte formats dates is a rather difficult task. - VladD
  • one
    @VladD and there is no need to guess, from a normal DateTime to get the view "at full moon five minutes before sunrise" is not difficult, but to decrypt back - the task is no simpler than machine translation from Japanese to Yakut =) - rdorn

0